Skip to content

Conversation

@litury
Copy link
Contributor

@litury litury commented Jan 29, 2026

Summary

Remove allOf and z.union() constructs from tool schemas that cause Claude API errors.

Problem

Claude Code v2.0.21+ rejects MCP tools with oneOf, allOf, or anyOf at the top level of JSON Schema:

API Error: 400 input_schema does not support oneOf, allOf, or anyOf at the top level

Related: anthropics/claude-code#4886

@ar2rsawseen ar2rsawseen force-pushed the fix/schema-claude-api-compatibility branch from 46b4dbf to 2f214c7 Compare February 2, 2026 16:05
@ar2rsawseen ar2rsawseen force-pushed the fix/schema-claude-api-compatibility branch from 2f214c7 to 1610d6e Compare February 2, 2026 16:11
@ar2rsawseen
Copy link
Member

Hey , very nice catch.
I already removed all the specific changes that conflicted with Claude before, but I guess some more were added with latest changes.

Most probably we will need to add some check to CI to not allow those schema parts

@ar2rsawseen ar2rsawseen merged commit f2d9056 into Countly:main Feb 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants