Skip to content

feat: add character count to pagination footer #62

@George-iam

Description

@George-iam

The pagination utility (src/utils/pagination.ts) splits large MCP tool outputs into pages. The navigation footer currently shows "Page X/Y" but does not indicate how much content is on the current page or the total content size. Adding a character/word count (e.g., "Page 2/5 (12,340 chars, 47,200 total)") would help the agent decide whether to request the next page or skip it.

Relevant files:

  • src/utils/pagination.ts — modify the paginateSections function's footer generation
  • test/pagination.test.ts — add tests for the new footer format

Acceptance criteria:

  • Pagination footer includes character count for current page and total
  • Existing pagination tests still pass
  • At least 2 new tests verify the character count in the footer
  • npm test passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions