fix: handle JSON Schema in additionalProperties for MCP tools (#4454)

Fixes #4176

Some common tools provide a schema (even if just an empty object schema)
as the value for `additionalProperties`. The parsing as it currently
stands fails when it encounters this. This PR updates the schema to
accept a schema object in addition to a boolean value, per the JSON
Schema spec.
This commit is contained in:
Marcus Griep
2025-10-02 13:05:51 -04:00
committed by GitHub
parent 2f6fb37d72
commit b727d3f98a
4 changed files with 153 additions and 10 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ It is important to remember:
parameters: JsonSchema::Object {
properties,
required: Some(vec!["input".to_string()]),
additional_properties: Some(false),
additional_properties: Some(false.into()),
},
})
}