[Proposal] Soft maximum field length limits for input schema
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- html
- 领域
- api
调研方向
Read the related discussion in #73 and #219 and PR #265, then review the WebMCP specification sections defining tool names, input schemas, and metadata. The issue asks participants to agree on recommended field limits, enforcement for parameter names, and Unicode code point measurement; done means the proposal has an ecosystem decision. The payload does not identify specific files or tests.
由索引模型根据 Issue 内容生成。
描述
To help ground the discussion in #73, #219, and PR #265, we (Chrome) analyzed field lengths (in Unicode code points) across 13,472 unique public WebMCP tools indexed on webmcp.com (deduplicated).
The goal here is to align on a baseline set of limits and gather ecosystem feedback, using Hard Maximums for programmatic identifiers and Soft Maximums for natural-language descriptions. This will help us balance prompt-injection mitigation against varying model capacities.
Proposed Limits & Distribution
Unlike a browser-enforced Hard Maximum (which rejects registration in registerTool()), a Soft Maximum is a recommendation: well-behaved agents should accept at least up to the Soft Maximum without truncating or rejecting the field, while remaining free to accept longer inputs if their model/context budget allows. Web developers who stay within the Soft Maximum should expect reliable support across agents.
(Defining broader "well-behaved agent" guidelines could be a useful follow-up, though out of scope for this discussion.)
| Field | Proposed Limit | Limit Type | p50 |
p90 |
p95 |
p99 |
Max | Pass Rate (webmcp.com unique) |
|---|---|---|---|---|---|---|---|---|
Tool Name (tool.name) |
128 code points (ASCII only per spec) | Hard Max (already in spec) | 16 | 25 | 28 | 36 | 64 | 100% |
Parameter Name (inputSchema keys) |
128 code points | Hard Max (or Soft Max) | 7 | 13 | 16 | 22 | 43 | 100% |
Tool Description (tool.description) |
750 code points | Soft Max (recommended limit) | 130 | 340 | 468 | 1,092 | 11,251 | 98.1% |
Parameter Description (inputSchema descriptions) |
500 code points | Soft Max (recommended limit) | 46 | 110 | 153 | 301 | 14,348 | 99.7% |
- A note on Hard vs. Soft Max for Parameter Names (
128code points): Sincetool.namealready has a 128 code point hard cap in the spec, we could also make parameter names a 128 code point Hard Max to keep programmatic identifiers symmetric. If we prefer not to recursively validateinputSchemakeys duringregisterTool(), we can establish 128 code points as a Soft Max recommendation alongside the description fields.
I also sampled tools from webmcp.com that do not "pass" the recommended tool description and parameter description limits. All of those I sampled could be rewritten in fewer code points or split up into multiple tools. LMK if anyone wants more info on this.
Would love feedback from site developers & agent builders:
- For agent & model developers: Are 750 / 500 / 128 code points reasonable minimum acceptance thresholds for well-behaved agents to guarantee without truncation?
- Parameter Names: Should parameter names be enforced as a Hard Maximum in the spec (symmetric with
tool.name), or kept as a Soft Maximum recommendation soregisterTool()doesn't need to recursively validateinputSchemakeys? - Text Unit (
Unicode code points): Are there any objections to standardizing on Unicode code points for these tool metadata fields to minimize developer burden (vs. UTF-8 bytes or model-specific tokens) and avoid penalizing non-Western scripts (which would also resolve #219 and unblock PR #265)?
cc: @johannhof @markafoltz @domfarolino
- 主要语言
- Bikeshed
- 星标
- 4.7k
- 派生
- 328
- 平均合并
- 2 天 9 小时
- 30 天内合并 PR
- 15
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
webmachinelearning/webmcp 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
webmachinelearning/webmcp#362 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
webmachinelearning/webmcp#360 · 1 条评论 ·
维护者通常 1 天内回复
-
Say how an agent should weigh annotations that the page wrote about itself可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
webmachinelearning/webmcp#353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
webmachinelearning/webmcp#343 · 1 个 reaction ·
维护者通常 1 天内回复
-
Agenda+ i18n-tracker
难度 2/5 1-3 小时 新手友好度 75/100
webmachinelearning/webmcp#273 · 3 条评论 ·
维护者通常 1 天内回复
查看 webmachinelearning/webmcp 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 5 天内回复
-
area-multitenancy area-security p1-recommended priority-high technical-debt
难度 2/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
fossasia/visdom-dev#77 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 63/100
FriendsofECCE/ECCE#519 ·