Skip to content

fix: support paginated tool discovery and avoid info instruction timeouts#221

Open
haosenwang1018 wants to merge 7 commits intophilschmid:mainfrom
haosenwang1018:fix/paginated-list-tools-and-optional-info-instructions
Open

fix: support paginated tool discovery and avoid info instruction timeouts#221
haosenwang1018 wants to merge 7 commits intophilschmid:mainfrom
haosenwang1018:fix/paginated-list-tools-and-optional-info-instructions

Conversation

@haosenwang1018
Copy link
Copy Markdown

Fixes #206

What

  • make listTools() follow nextCursor and aggregate all pages
  • add a regression test for multi-page tool listings
  • make info <server> treat getInstructions() as best-effort so a slow/unsupported instructions fetch does not fail or time out the whole command

Why

Some MCP servers expose tools across multiple pages. The previous implementation only returned the first page, which could make tools appear missing.

While validating that fix, I also hit an HTTP integration timeout caused by info eagerly waiting on getInstructions() even though the core server details output does not require it. Making instructions optional keeps the command responsive without affecting the main details view.

Testing

  • bun test tests/integration/cli.test.ts tests/cli-errors.test.ts
  • result: 68 pass / 0 fail

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.

Some tools are missing when connecting to servers with many tools

1 participant