aeewws/tool-schema-fixer
CLI for normalizing generic tool schemas into OpenAI, Anthropic, and Gemini-friendly shapes.
Platform-specific configuration:
{
"mcpServers": {
"tool-schema-fixer": {
"command": "npx",
"args": [
"-y",
"tool-schema-fixer"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
tool-schema-fixer is a small Node.js CLI for taking generic JSON Schema or tool parameter schema files and normalizing them into shapes that are friendlier to OpenAI, Anthropic, and Gemini tool-calling flows.
The first release is intentionally conservative. It focuses on a clear set of rules that are practical in real tool schemas, emits a machine-readable or text report, and avoids pretending to fully transpile every JSON Schema feature into every provider's subset.
lint for compatibility analysis.fix --target openai|anthropic|gemini for normalization.Supported wrapper shapes:
{"type":"function","function":{"parameters":{...}}} or {"function":{"parameters":{...}}}{"name":"...","parameters":{...}}{"name":"...","input_schema":{...}}Current rules are deliberately explicit:
$schema, $id, example, examples, deprecated, readOnly, and writeOnly.nullable and simple null unions:openai: collapse to a single concrete type.anthropic: convert to JSON Schema type: ["T", "null"].gemini: convert to OpenAPI-style nullable: true.type: [...] unions:anyOf for Gemini and most OpenAI nested schemas.additionalProperties: false when they already declare explicit properties.openai, fill required with every declared property tLoading reviews...