[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 中描述的通訊協定版本 fallback;對於 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 摘要。