From ec3efce440386c03657046236298f9a779b2c002 Mon Sep 17 00:00:00 2001 From: olaservo Date: Sat, 1 Aug 2026 17:36:59 -0700 Subject: [PATCH 1/4] fix(schema): close type-check bypass in composition inputSchema example The `find_resource` example distinguished its `oneOf` branches with branch-local `properties`. Failing a branch on a type error is exactly what makes `oneOf` succeed, so a wrongly-typed value in the inactive branch was accepted: {"id": "r1", "name": 123} validated {"id": 123, "name": "alpha"} validated The mutual exclusivity the example demonstrates was therefore bypassable by supplying both fields and malforming one, and neither field was type-checked while it was the non-selected branch. Hoist `properties` to the schema root and reduce `oneOf` to the exclusivity assertion. Validation is otherwise unchanged: `{}` and `{id, name}` are still rejected, each field alone still passes. The root `properties` map is also no longer empty, so consumers that build a parameter list from `inputSchema.properties` advertise the tool's arguments instead of showing none. Applied to both draft and 2026-07-28. The 2026-07-28 copy is not referenced by any `@includeCode`, so that revision's rendered schema page is unchanged. Also wire the two SEP-2106 examples into the draft `Tool` docs. Both were added as files but never referenced, so neither appeared on the rendered page. Co-Authored-By: Claude Opus 5 --- docs/specification/draft/schema.mdx | 2 +- .../tool-with-composition-input-schema.json | 27 +++++++------------ .../tool-with-composition-input-schema.json | 27 +++++++------------ schema/draft/schema.ts | 6 +++++ 4 files changed, 25 insertions(+), 37 deletions(-) diff --git a/docs/specification/draft/schema.mdx b/docs/specification/draft/schema.mdx index 159c7be5e..a4e3e103d 100644 --- a/docs/specification/draft/schema.mdx +++ b/docs/specification/draft/schema.mdx @@ -1506,7 +1506,7 @@ different cache).