loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

tool-schema-fixer

MCP Tool

aeewws/tool-schema-fixer

CLI for normalizing generic tool schemas into OpenAI, Anthropic, and Gemini-friendly shapes.

Install

$ npx loaditout add aeewws/tool-schema-fixer

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "tool-schema-fixer": {
      "command": "npx",
      "args": [
        "-y",
        "tool-schema-fixer"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

tool-schema-fixer

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.

What it does
  • Reads a JSON file containing either a plain schema or a common tool wrapper.
  • Supports lint for compatibility analysis.
  • Supports fix --target openai|anthropic|gemini for normalization.
  • Writes the fixed schema to stdout or a file.
  • Emits a report describing applied fixes and anything that still needs manual review.

Supported wrapper shapes:

  • Plain schema: the file itself is the schema.
  • OpenAI-style tool wrapper: {"type":"function","function":{"parameters":{...}}} or {"function":{"parameters":{...}}}
  • Generic tool wrapper: {"name":"...","parameters":{...}}
  • Anthropic-style tool wrapper: {"name":"...","input_schema":{...}}
First-release normalization rules

Current rules are deliberately explicit:

  • Strip provider-unfriendly metadata keywords such as $schema, $id, example, examples, deprecated, readOnly, and writeOnly.
  • Normalize 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.
  • Normalize simple type: [...] unions:
  • null unions are rewritten using the target's preferred nullability form.
  • other unions are kept for Anthropic, or rewritten to anyOf for Gemini and most OpenAI nested schemas.
  • Close object schemas with additionalProperties: false when they already declare explicit properties.
  • For openai, fill required with every declared property t

Tags

anthropiccligeminijson-schemamcpopenaitool-calling

Reviews

Loading reviews...

Quality Signals

0
Installs
Last updated16 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcegithub-crawl
Last commit3/31/2026
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/aeewws/tool-schema-fixer)](https://loaditout.ai/skills/aeewws/tool-schema-fixer)