Skip to content

Adjust default tool search result caps#17684

Merged
malone-oai merged 1 commit into
mainfrom
malone/adjust-tool-search-caps
Apr 14, 2026
Merged

Adjust default tool search result caps#17684
malone-oai merged 1 commit into
mainfrom
malone/adjust-tool-search-caps

Conversation

@malone-oai

Copy link
Copy Markdown
Contributor

Summary

  • Allows selected MCP results to return a larger default result set.
  • Keeps the existing default cap for other MCP results.
  • Applies the cap consistently when higher explicit limits are requested.

Testing

  • cargo test -p codex-core tool_search
  • Ran a local CLI smoke test with two stdio MCP servers exposing 100 tools each; the selected-server query returned 20 tools and the regular-server query returned 8.

@github-actions

github-actions Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@malone-oai

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Apr 13, 2026
@malone-oai malone-oai force-pushed the malone/adjust-tool-search-caps branch from 262ed4f to d741ec6 Compare April 13, 2026 20:09
@malone-oai malone-oai marked this pull request as ready for review April 13, 2026 20:10
@malone-oai malone-oai force-pushed the malone/adjust-tool-search-caps branch 2 times, most recently from 40b6b7c to b60b202 Compare April 13, 2026 21:23
Comment thread codex-rs/core/src/tools/handlers/tool_search.rs Outdated
@malone-oai malone-oai force-pushed the malone/adjust-tool-search-caps branch 2 times, most recently from da8d14e to 06c5933 Compare April 14, 2026 19:38
Comment thread codex-rs/core/src/tools/handlers/tool_search.rs
@malone-oai malone-oai force-pushed the malone/adjust-tool-search-caps branch from 06c5933 to 1183521 Compare April 14, 2026 19:52
Comment thread codex-rs/core/src/tools/handlers/tool_search.rs
Comment on lines +112 to +113
limit: usize,
use_default_limit: bool,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

very small nit and we can address as followup to unblock - I don't see the point of unpacking and unwrap with fallback at line 73 to be fair.

@malone-oai malone-oai force-pushed the malone/adjust-tool-search-caps branch from 1183521 to 8a237cb Compare April 14, 2026 21:32
@malone-oai malone-oai merged commit 78835d7 into main Apr 14, 2026
32 of 38 checks passed
@malone-oai malone-oai deleted the malone/adjust-tool-search-caps branch April 14, 2026 21:57
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants