Tool Schema Conversion

    by Khristian Kopachelli

    1

    Verify JSON Schema integrity and detect dropped constraints in AI tool-calling pipelines and MCP servers.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Tool Schema Conversion

    Example session with this skill installed

    Audit this conversion: the original schema has maxItems: 5 and uniqueItems: true, but the converted version only shows type: array. Find a counterexample.

    • Read your context and instructions
    • Compiled the tool schema conversion

    I have audited the schema conversion and identified critical constraint drift. The conversion dropped the maxItems and uniqueItems validation logic, which will lead to downstream failures if the model generates large or duplicate arrays.

    Schema Conformance Report

    PathCodeSeverityDetail
    $.properties.tags.maxItemsconstraint-droppedCRITICALValue 5 vanished during transformation.
    $.properties.tags.uniqueItemsconstraint-droppedMAJORBoolean constraint true was lost.

    Drift Evidence: Counterexample Found

    The following payload is accepted by your

    Original Schema but would be rejected or mis-processed by the

    Converted Schema logic (or vice versa depending on directionality).

    {
      "tags": ["alpha", "beta", "gamma", "delta", "epsilon", "zeta"]
    }
    

    Note: This 6-item array violates the original maxItems: 5 constraint but passes the converted type: array definition.

    Conformance Profile

    import { checkConversion, findCounterexample } from 'schema-conformance';
    
    const original = {
      type: 'object',
      properties: {
        tags: { type: 'array', items: { type: 'string' }, maxItems: 5, uniqueItems: true }
      }
    };
    
    const converted = {
      type: 'object',
      properties: {
        tags: { type: 'array', items: { type: 'string' } }
      }
    };
    
    const diagnostics = checkConversion(original, converted);
    // Result: 2 diagnostics found.
    

    Next steps

    1. Update your SDK's normalization layer to include the missing maxItems keyword.
    2. Add profileConverter to your CI suite to catch future regressions in this transformation.
    3. Use the generated JSON counterexample to create a failing unit test in your gateway repository.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Constraint drift between schema layers is invisible until production. When tool definitions pass through libraries, SDKs, and gateways, specific keywords like maxItems or pattern often vanish, leading to model outputs that break downstream code. This skill provides the conformance checking discipline required to verify tool-schema integrity across your entire pipeline.

    What it does

    • Audit conversions via checkConversion to identify dropped or altered JSON Schema keywords.
    • Generate counterexamples using findCounterexample to produce concrete values that prove acceptance drift.
    • Profile converters against a shared corpus in CI to gate releases on schema conformance.
    • Trace diagnostics with specific JSON paths and error codes for dropped properties or structural changes.
    • Verify tool-calling integrity specifically for MCP servers, SDK gateways, and provider normalization layers.

    How it works

    1. Import the schema-conformance reference implementation into your test suite or CI pipeline.
    2. Execute checkConversion on the original and transformed schemas to receive a diagnostic report of dropped constraints.
    3. Run findCounterexample to generate a bug report containing a value that the original schema accepts but the conversion rejects.
    4. Integrate profileConverter into your CI flow to test your transformation logic against the full keyword corpus.

    Frameworks & tools

    Built for TypeScript and JavaScript environments (Node.js and browsers). It targets MCP servers, tool-calling SDKs, and JSON Schema transformation pipelines.

    Why this beats prompting it yourself

    Standard LLMs struggle to track subtle keyword loss across nested JSON structures and cannot perform bounded sampling to find valid counterexamples. This skill provides a deterministic, code-based verification layer that identifies silent failures prompts would overlook.

    Use cases

    • Audit MCP servers to ensure tool definitions aren't stripped of constraints by the server host.
    • Test SDK gateways when serializing tool schemas for specific model providers like OpenAI or Anthropic.
    • Gate CI pipelines to prevent upstream library updates from breaking your tool-calling contracts.
    • Debug model errors by proving a schema no longer enforces the minLength or enum values you expected.

    Known limitations

    Supports a specific subset of JSON Schema keywords; does not cover oneOf, anyOf, $ref, or if-then. Designed for development and CI environments rather than high-performance production request paths.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    Permissions

    No special permissions declared or detected

    Listed5 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies 'constraint drift,' where specific JSON Schema keywords like `pattern` or `maxItems` are stripped away as tool definitions move through different SDKs and gateways, leading to downstream model errors.

    The skill is optimized for TypeScript and JavaScript environments, making it ideal for auditing MCP servers, tool-calling SDKs, and provider normalization layers like those used for OpenAI or Anthropic.

    Unlike prompting, which can miss subtle nested changes, this skill uses deterministic code-based verification and bounded sampling to find concrete counterexamples that prove when a schema is broken.

    The current version supports core validation keywords but does not cover complex logical operators like `oneOf`, `anyOf`, `if-then`, or external `$ref` resolutions.

    You receive the `schema-conformance` reference implementation, including the `checkConversion`, `findCounterexample`, and `profileConverter` functions, along with integration guides for your CI/CD pipeline.

    It is designed as a development and CI tool for testing and gating releases; it is not intended for use within high-performance, real-time production request paths.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.