Skip to content

feat(mcp): add paginated history tools#24

Merged
hubab1 merged 1 commit into
mainfrom
21-mcp-history-read-tools
Jul 18, 2026
Merged

feat(mcp): add paginated history tools#24
hubab1 merged 1 commit into
mainfrom
21-mcp-history-read-tools

Conversation

@hubab1

@hubab1 hubab1 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • add read-only list_keyword_ranking_history, list_keyword_ranking_results, and list_rating_history MCP tools
  • keep ranking data scoped to the requested app and its currently tracked queries
  • provide stable keyset pagination, date/filter validation, persisted source evidence, and bounded nested ranked-app rows
  • reject malformed optional arguments and oversized filters/cursors instead of silently broadening a query

Performance and safety

  • history parent pages are capped at 50 and nested responses at 500 ranked-app rows
  • child rows are loaded with one bounded batch query per tool, with a 10,000-row scan ceiling
  • cursor scope is represented by a fixed-size SHA-256 digest and pagination tie-breakers use explicit lexical ordering
  • all tools are annotated read-only and closed-world

Validation

  • 48 focused MCP service/server tests passed
  • 219 full-suite tests passed
  • the pagination stress test was repeated three times
  • signed Debug build succeeded, launched successfully, and was terminated after verification
  • independent correctness, security/performance, and test reviews completed with no remaining P1/P2 findings

Attribution

Tool names and the history-query concept were inspired by PR #8 by @akshaynexus. This implementation is an independent rewrite against current main with bounded, deterministic pagination. No commits were cherry-picked.

@hubab1
hubab1 marked this pull request as ready for review July 18, 2026 20:20
@hubab1
hubab1 merged commit b110a65 into main Jul 18, 2026
1 check passed
@hubab1
hubab1 deleted the 21-mcp-history-read-tools branch July 18, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant