Skip to content

Commit 9a0acc4

Browse files
binarykclaude
andcommitted
fix: update MCP tool schemas to conform to JSON Schema draft 2020-12
Updates JSON schema definitions in GenerateActionTool and SearchRestifyDocs: - Fix additionalProperties to use proper type definition instead of boolean - Remove trailing commas from JSON schema objects - Ensures compatibility with Claude Code MCP validation Resolves: 400 API error "JSON schema is invalid. It must match JSON Schema draft 2020-12" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 357631a commit 9a0acc4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Mcp/Tools/GenerateActionTool.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ public function schema(ToolInputSchema $schema): ToolInputSchema
3434
->raw('validation_rules', [
3535
'description' => 'Validation rules for the action payload as key-value pairs',
3636
'type' => 'object',
37-
'properties' => [],
38-
'additionalProperties' => true,
37+
'additionalProperties' => [
38+
'type' => ['string', 'array'],
39+
'items' => [
40+
'type' => 'string'
41+
]
42+
]
3943
])
4044
->optional()
4145
->string('uri_key')

src/Mcp/Tools/SearchRestifyDocs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public function schema(ToolInputSchema $schema): ToolInputSchema
3333
'type' => 'array',
3434
'items' => [
3535
'type' => 'string',
36-
'description' => 'Search query string - extract key terms from user questions',
36+
'description' => 'Search query string - extract key terms from user questions'
3737
],
38-
'minItems' => 1,
38+
'minItems' => 1
3939
])->required()
4040
->string('question_type')
4141
->description('Type of question being asked: "count" (how many types), "list" (what are available), "howto" (how to do something), "concept" (explain concept), "example" (show examples)')

0 commit comments

Comments
 (0)