Repository navigation
MCP - Handling Complex Schemas + System Prompt #6773
Replies: 4 comments 5 replies
|
|
|
Is it possible this may be caused by using "type" as property name, when "type" is a reserved keyword in JSON Schema used to define the data type of a property? |
|
@dvejsada i have no idea i mean in cline it works fine but running same prompt in librechat it throwing this error |
"parameters": {
"anyOf": [
{
"type": "object",
"properties": {
},
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Optional parameters required for connection. Not needed if using a default connector. Examples: {'api_key': '1234567890'}"
}also firecrawl_crawl has this kind of property on the webhook field "webhook": {
"oneOf": [
{
"type": "string",
"description": "Webhook URL to notify when crawl is complete"
},
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Webhook URL"
},
"headers": {
"type": "object",
"description": "Custom headers for webhook requests"
}
},
"required": [
"url"
]
}
]
} |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Claude/Anthropic Model Unable to Handle Complex JSON Schema with anyOf/oneOf
Description
I've set up LibreChat with a custom MCP server containing 20 tools with complex schemas. While the tools are correctly displayed and accessible, I'm encountering issues when Claude (Anthropic's model) attempts to create connections using schemas that contain
anyOf/oneOfconditions.https://github.com/danny-avila/LibreChat/issues/new/chooseEnvironment
Configuration
docker-compose.override.yml
MCP server yaml config
Error
When attempting to create a connection, the following error occurs:
Investigation
The issue appears to be related to how complex JSON schemas with
anyOf/oneOfconditions are handled. Looking at Cline's implementation (specifically this code), they handle this by:JSON.stringifyto send the input schemaPotential Solution
Implementing similar handling of complex schemas as Cline does might resolve this issue.
Additional Context
Would you like me to post the schema as a comment to maintain better readability of the main issue?
All reactions