Skip to content

fix(mcp): honor page and page_size in search tools - #1685

Merged
LinkinStars merged 3 commits into
apache:devfrom
lhk0504:fix/mcp-search-pagination
Nov 26, 2026
Merged

LinkinStars merged 3 commits into
apache:devfrom
lhk0504:fix/mcp-search-pagination

Conversation

@lhk0504

@lhk0504 lhk0504 commented Nov 22, 2026

Copy link
Copy Markdown

Fixes #1676

Proposed Changes

  • Expose page and page_size parameters in the get_questions and get_comments MCP tool schemas.
  • Parse the parameters in NewMCPSearchCond and NewMCPSearchCommentCond with defaults (page 1, page_size 5) and an upper bound of 50 on page_size.
  • Use the parsed values in MCPQuestionsHandler and MCPCommentsHandler instead of the hardcoded Page: 1, Size: 5.
  • Add unit tests covering defaults, explicit values, string arguments, invalid values and the page_size cap.

fenbox and others added 3 commits November 19, 2026 15:26
## Proposed Changes

- Add `AGENTS.md` with repository structure, development commands,
coding conventions, testing guidance, and commit/PR expectations.
- Add an English `DESIGN.md` following the design.md alpha
specification, documenting React Bootstrap as the design foundation and
the default primary color `#0033FF`.
- Document existing theme overrides, dark mode, layout conventions, and
component usage, with YAML design tokens and source references.

## Validation

- Checked commands and conventions against repository configuration and
source files.
- Confirmed `DESIGN.md` contains no Chinese text.
- `git diff --cached --check` passed before committing.
- Documentation-only changes; no application tests run.
@LinkinStars
LinkinStars changed the base branch from main to dev November 26, 2026 03:56
@LinkinStars LinkinStars self-assigned this Nov 26, 2026

@LinkinStars LinkinStars left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LinkinStars
LinkinStars merged commit ec53e4b into apache:dev Nov 26, 2026
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.

fix(mcp): search tools hardcode page size and ignore pagination parameters

3 participants