Skip to content

Commit 7bb70f6

Browse files
cliffhallclaude
andcommitted
fix(everything): declare get-header-params' nullable regionHeader with anyOf
The Inspector's schema-portability check warns on `type: ["string", "null"]`: legal JSON Schema, but a client that maps tool schemas onto a single-`type` dialect (the OpenAPI subset of Gemini function declarations) may reject the tool or drop the constraint. regionHeader is now `anyOf: [{ type: "string" }, { type: "null" }]`; null still validates. Part of #4852 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 2b830d4 commit 7bb70f6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/everything/tools/get-header-params.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ const outputSchema: JsonSchemaType = {
5555
type: "object",
5656
properties: {
5757
region: { type: "string" },
58+
// Nullable as anyOf with one type per branch, not `type: ["string",
59+
// "null"]`: some clients map tool schemas onto a dialect that allows a
60+
// single `type` per property (the OpenAPI subset of Gemini function
61+
// declarations, for one) and reject or drop the array form.
5862
regionHeader: {
59-
type: ["string", "null"],
63+
anyOf: [{ type: "string" }, { type: "null" }],
6064
description: "The Mcp-Param-Region header the request carried, if any",
6165
},
6266
repeated: { type: "array", items: { type: "string" } },

0 commit comments

Comments
 (0)