-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCP - Handling Complex Schemas + System Prompt #5429
Comments
|
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 |
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
/oneOf
conditions.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
/oneOf
conditions are handled. Looking at Cline's implementation (specifically this code), they handle this by:JSON.stringify
to 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?
The text was updated successfully, but these errors were encountered: