[2026-07-28] Schema modernization & error code standardization

未关闭
#337 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
php
领域
api, backend

调研方向

从子议题 #356–#359 及其 SEP 链接开始。对于错误代码相关工作,检查 src/Schema/JsonRpc/Error.php 以及 issue 中描述的协议版本回退;对于 schema 相关工作,从 SchemaValidator 和所列出的 JSON Schema 词汇、outputSchema、structuredContent、SSRF 及 DoS 要求开始。完成意味着所有列出的子议题都已按照合并后的 SEP 要求完成。

由索引模型根据 Issue 内容生成。

描述

2026-07-28 enhancement improves spec compliance Schema

Tracking issue for the MCP Spec 2026-07-28 releaseSchema & errors milestone.

SEPs covered

SEP Title Spec PR
SEP-2106 Tools inputSchema/outputSchema conform to JSON Schema 2020-12 #2106
SEP-2164 Standardize resource-not-found error code to -32602 #2164

Sub-issues

SEP-2106 (JSON Schema 2020-12):

  • #356 — Vocabulary support (oneOf/anyOf/allOf/if-then-else/$ref)
  • #357 — Allow non-object outputSchema and structuredContent
  • #358 — Harden SchemaValidator against external $ref SSRF and composition DoS

SEP-2164:

  • #359 — Switch resource-not-found error code to -32602 with protocol-version-aware fallback

Notes

  • Both SEPs are merged.
  • SEP-2106 is the largest code-level lift this cycle for the schema layer: full JSON Schema 2020-12 vocabulary (composition, conditionals, $ref), plus non-object outputSchema / structuredContent. Also requires hardening against external $ref SSRF and composition DoS.
  • SEP-2164 is mechanically a one-constant flip in src/Schema/JsonRpc/Error.php with a protocol-version-aware fallback.
主要语言
PHP
星标
1.6k
派生
173
平均合并
2 天 49 分钟
30 天内合并 PR
23

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/php-sdk 的其他 Issue

查看 modelcontextprotocol/php-sdk 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。