The `maxToolInputElements` refusal lacks the `Input validation error:` prefix that the schema refusal carries
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
从packages/server/src/server/mcp.ts开始,阅读McpServer.validateToolInput,并比较因大小限制而拒绝与 issue 中描述的因 schema 验证而拒绝。更新大小限制拒绝的措辞,使其包含共用前缀,然后检查针对这两种拒绝消息的相关服务器测试。大小限制拒绝以Input validation error:开头并保留现有细节,即为完成。
由索引模型根据 Issue 内容生成。
描述
Version: @modelcontextprotocol/sdk 1.32.2 (the same text is in packages/server/src/server/mcp.ts on main).
McpServer.validateToolInput refuses a tool call in two ways. Both are McpError(ErrorCode.InvalidParams, …), and the tools/call handler returns either one as an isError: true result:
- arguments over
maxToolInputElements:
Invalid arguments for tool start_run: arguments contain more than the maximum of 50000 elements - arguments that fail the input schema:
Input validation error: Invalid arguments for tool get_run_state: Invalid input: expected string, received number at run_id
A client or a log filter that recognises an input refusal by its Input validation error: prefix misses the first one. Yet both are the same kind of refusal: bad arguments, same error code.
Suggestion: give the size refusal the same prefix:
Input validation error: Invalid arguments for tool start_run: arguments contain more than the maximum of 50000 elements
Context: we set maxToolInputElements: 50_000 in Realm's MCP server (thank you for #2926/#2927), and we document both texts for our users.
Related: #2879 asks for a hook to shape the schema refusal's result; if it lands, the size refusal could go through the same hook.
- 主要语言
- TypeScript
- 星标
- 13.7k
- 派生
- 2.3k
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 61
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/typescript-sdk 的其他 Issue
-
server: registeredResource.update and registeredResourceTemplate.update desync title and metadata.title when updating metadata alone可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭v1 v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/typescript-sdk#3103 · 2 条评论 ·
维护者通常 1 天内回复
-
[v1.x] Protocol.request keeps its abort listener after the request resolved, so a later abort sends notifications/cancelled for an answered request (1.30.0)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭v1
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/typescript-sdk#3090 · 2 条评论 ·
维护者通常 1 天内回复
-
[v2] e2e `protocol:timeout:max-total` is flaky over SSE: fake timers advance before the request reaches the server可能已有人在做 @Singmin 于 10 天前认领。 未关闭v1 v2
难度 2/5 1-3 小时 新手友好度 72/100
modelcontextprotocol/typescript-sdk#3045 ·
维护者通常 1 天内回复
-
[v1.x] Backport #2654: `notifications/cancelled` with `requestId: 0` is ignored, so the first server→client request cannot be cancelled (still in 1.32.1)可能已有人在做 @CloudCorpRecords 于 11 天前认领。 未关闭v1
难度 2/5 1-3 小时 新手友好度 77/100
modelcontextprotocol/typescript-sdk#3043 · 2 条评论 ·
维护者通常 1 天内回复
-
v1 v2
难度 2/5 1-3 小时 新手友好度 72/100
modelcontextprotocol/typescript-sdk#2946 · 4 条评论 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/typescript-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
gnosis/gnosis_vpn#661 ·
维护者通常 1 天内回复
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)未关闭triage:bug-verified
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
fix: reject sourceStorage/packagedStorage bucket that differs from the stack default (fail loud)未关闭
难度 2/5 1-3 小时 新手友好度 82/100
Eyevinn/open-videocore#1300 ·
维护者通常 1 天内回复
-
nextjs-tracking
难度 2/5 1-3 小时 新手友好度 67/100
cloudflare/vinext#4390 ·
维护者通常 1 天内回复
-
kind/bug
难度 2/5 1-3 小时 新手友好度 82/100
kubernetes-sigs/headlamp#8175 ·
维护者通常 2 天内回复