php-sdk/tests/Unit/Schema
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel 605df8771f
[Schema] Refuse an invalid x-mcp-header annotation at definition time (#441)
* [Schema] Refuse an invalid x-mcp-header annotation at definition time

SEP-2243 calls a tool definition invalid when its x-mcp-header annotation is
empty, is not an HTTP field name, collides case-insensitively with another,
or sits on a number, array or object property - none of which can be
mirrored onto a header.

Nothing said so. The earliest place to is where the tool is defined, rather
than on the request that trips over it.

* Clarify x-mcp-header validation only reaches properties

* Make checkHeaderAnnotations() a private instance method

* Make headerAnnotations() a private instance method

* Apply suggestion from @chr-hertel
2026-08-18 20:16:35 +02:00
..
Content [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
Elicitation [Schema] Stop rejecting elicitation schemas the specification allows (#437) 2026-08-18 19:49:15 +02:00
Enum [Capability] Harden structuredContent extraction (#417) 2026-08-15 04:03:20 +02:00
Extension [Schema] Serialize a settingless extension as an object (#438) 2026-08-18 14:59:12 +02:00
JsonRpc [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
Request [Schema][Server] Harden sampling tools against the spec (#420) 2026-08-15 04:13:53 +02:00
Result [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
ClientCapabilitiesTest.php [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
ElicitationModeTest.php [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
IconTest.php [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
ImplementationTest.php [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
NonObjectOutputSchemaTest.php [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
ResourceDefinitionTest.php [Schema] Drop SDK-only name pattern on resources and resource templates (#430) 2026-08-18 02:09:07 +02:00
ResourceTemplateTest.php [Schema] Drop SDK-only name pattern on resources and resource templates (#430) 2026-08-18 02:09:07 +02:00
ServerCapabilitiesTest.php Split testsuite for unit and inspector based tests (#82) 2025-09-25 22:27:41 +01:00
ToolChoiceTest.php [Schema][Server] Close the 2025-11-25 schema gaps and add the 2026-07-28 surface (#421) 2026-08-17 23:09:39 +02:00
ToolHeaderAnnotationTest.php [Schema] Refuse an invalid x-mcp-header annotation at definition time (#441) 2026-08-18 20:16:35 +02:00
ToolTest.php [Schema] Always emit {} for empty tool schema properties (#407) 2026-08-14 21:50:08 +02:00