MCP tools/list fetched as a single page — tools beyond the first page are silently dropped
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api
Research direction
Start in packages/opencode/src/mcp/index.ts and inspect both the standard client.listTools() path and listToolsLenient() request path, paying attention to nextCursor handling. Add a multi-page tools/list test that verifies tools from every page are collected and retained in the registered tool set and cache.
Written by the indexing model from the issue text.
Description
Summary
The MCP client retrieves a server's tool list with a single tools/list request and never follows the nextCursor pagination marker. Any server that paginates its tool catalog will have every tool past the first page silently omitted — no error, no warning.
Details
Two code paths are affected, both in packages/opencode/src/mcp/index.ts:
- Standard path —
client.listTools(). In@modelcontextprotocol/sdk@1.26.0this issues a single request and does not loop over pagination:async listTools(params, options) { const result = await this.request({ method: 'tools/list', params }, ListToolsResultSchema, options); ... } - Lenient fallback —
listToolsLenient()callsclient.request({ method: "tools/list", params: {} }, ...), a single request that ignoresnextCursoreven thoughLenientListToolsResultSchemamodels that field.
Because neither path advances the cursor, tools beyond the first page are dropped from the registered tool set and from the tool-list cache.
Impact
Minor→Medium. Only affects servers whose tool catalog is large enough to paginate; most servers return all tools in one page. When it does occur, the failure is silent — affected tools simply never appear.
Suggested fix
- Loop on
nextCursor, concatenatingtools, in both the standard and lenient paths before returning/caching. - Add a test with a multi-page
tools/listresponse to verify all pages are collected.
- Dominant language
- TypeScript
- Stars
- 813
- Forks
- 134
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 65
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AltimateAI/altimate-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AltimateAI/altimate-code#1359 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1323 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AltimateAI/altimate-code#1288 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AltimateAI/altimate-code#1284 ·
All issues in AltimateAI/altimate-code
Similar issues
-
blocklist removal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pastelsky/bundlephobia#1122 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100