Tinplate 42 Edge APIs

AI Safety & Agents Tier 2 Ready POST /v1/tool-call-validator

LLM Tool-Call Validator API — Validate & Auto-Repair Function Calling JSON

Validate and auto-repair broken LLM tool-call arguments against your JSON Schema. Validate and auto-repair LLM tool calls and function arguments against JSON Schema for OpenAI, Anthropic, Gemini, and MCP agent workflows.

Try It Live in Your Browser · No API Key Required

1. Interactive Sandbox & Sample JSON Output

200 OK · Ready

Editable Request JSON (POST /v1/tool-call-validator)

Live 200 OK Response Envelope

{
  "ok": true,
  "data": {
    "valid": true,
    "verdict": "repaired",
    "provider_format": "flat",
    "tool_name": "search_orders",
    "call_id": null,
    "normalized_arguments": {
      "limit": 10,
      "include_archived": true
    },
    "mcp_call": {
      "method": "tools/call",
      "params": {
        "name": "search_orders",
        "arguments": {
          "limit": 10,
          "include_archived": true
        }
      }
    },
    "repairs": [
      "normalized_single_quotes",
      "removed_trailing_commas",
      "coerced_number:$.limit",
      "coerced_boolean:$.include_archived"
    ],
    "schema_errors": [],
    "llm_retry_feedback": null
  },
  "meta": {
    "request_id": "req_tcv_01",
    "ms": 1
  }
}

2. Quickstart Code Examples

Full TypeScript & Python SDK →
curl -X POST "https://api.tinplate.dev/v1/tool-call-validator" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -d '{"tool_call":{"name":"search_orders","arguments":"{'\''limit'\'': '\''10'\'', '\''include_archived'\'': '\''true'\'',}"},"tools":[{"name":"search_orders","parameters":{"type":"object","required":["limit","include_archived"],"properties":{"limit":{"type":"number","maximum":100},"include_archived":{"type":"boolean"}},"additionalProperties":false}}],"coerce_types":true}'
import { TinplateClient } from "@tinplate/sdk"; // npm install @tinplate/sdk

const tinplate = new TinplateClient({
  rapidApiKey: process.env.RAPIDAPI_KEY!,
});

const { data, meta } = await tinplate.call("/v1/tool-call-validator", {
  "tool_call": {
    "name": "search_orders",
    "arguments": "{'limit': '10', 'include_archived': 'true',}"
  },
  "tools": [
    {
      "name": "search_orders",
      "parameters": {
        "type": "object",
        "required": [
          "limit",
          "include_archived"
        ],
        "properties": {
          "limit": {
            "type": "number",
            "maximum": 100
          },
          "include_archived": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    }
  ],
  "coerce_types": true
});
console.log(`[${meta.ms} ms]`, data);
import requests

response = requests.post(
    "https://api.tinplate.dev/v1/tool-call-validator",
    headers={
        "Content-Type": "application/json",
        "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    },
    json={
  "tool_call": {
    "name": "search_orders",
    "arguments": "{'limit': '10', 'include_archived': 'true',}"
  },
  "tools": [
    {
      "name": "search_orders",
      "parameters": {
        "type": "object",
        "required": [
          "limit",
          "include_archived"
        ],
        "properties": {
          "limit": {
            "type": "number",
            "maximum": 100
          },
          "include_archived": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    }
  ],
  "coerce_types": true
}
)
print(response.json())
const response = await fetch("https://api.tinplate.dev/v1/tool-call-validator", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
  },
  body: JSON.stringify({
  "tool_call": {
    "name": "search_orders",
    "arguments": "{'limit': '10', 'include_archived': 'true',}"
  },
  "tools": [
    {
      "name": "search_orders",
      "parameters": {
        "type": "object",
        "required": [
          "limit",
          "include_archived"
        ],
        "properties": {
          "limit": {
            "type": "number",
            "maximum": 100
          },
          "include_archived": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    }
  ],
  "coerce_types": true
}),
});
const result = await response.json();
console.log(result);
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tinplate_tool_call_validator",
    "arguments": {
      "tool_call": {
        "name": "search_orders",
        "arguments": "{'limit': '10', 'include_archived': 'true',}"
      },
      "tools": [
        {
          "name": "search_orders",
          "parameters": {
            "type": "object",
            "required": [
              "limit",
              "include_archived"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "maximum": 100
              },
              "include_archived": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        }
      ],
      "coerce_types": true
    }
  }
}
OpenAPI 3.0.3 Schema Contract

Request Parameters & Response Schema Reference

Request Body Parameters (POST /v1/tool-call-validator)

Parameter Type & Constraints Description
tool_callrequired string | object Raw LLM tool call (OpenAI function/tool_call, Anthropic tool_use, Gemini functionCall, MCP tools/call, or raw string).
toolsrequired object[] List of allowed tool definitions with their JSON Schemas.
coerce_typesoptional boolean
default: true
Coerce safe LLM type mismatches ('10' -> 10, 'true' -> true, stringified JSON arrays/objects, enum casing).
strip_unknown_propertiesoptional boolean
default: true
Remove hallucinated keys not declared in `properties` when `additionalProperties: false`.
apply_defaultsoptional boolean
default: true
Populate missing properties that declare a `default` value in the JSON Schema.
fuzzy_match_tool_nameoptional boolean
default: true
Match tool names across snake_case, camelCase, and kebab-case differences.

Response data Object Fields (200 OK)

Field Type Description
valid boolean Field 'valid'
verdict "allow" | "repaired" | "reject" 'allow' if valid with zero repairs, 'repaired' if valid after healing/coercion, 'reject' if invalid.
provider_format "openai" | "anthropic" | "gemini" | "mcp" | "flat" | "raw_string" | "unknown" Field 'provider_format'
tool_name string | null Field 'tool_name'
call_id string | null Field 'call_id'
normalized_arguments object | null Field 'normalized_arguments'
mcp_call object | null Field 'mcp_call'
repairs string[] Field 'repairs'
schema_errors string[] Field 'schema_errors'
llm_retry_feedback string | null Deterministic correction message to feed back to the LLM when `valid` is false.

3. What Agent Tool-Call Validator & Repairer API Detects & Validates

Honest Engineering Boundaries

4. Known Limitations & Test Verification

Release Version: v1.0.7 · Last Verified / Benchmarked: 14 November 2026 · Latency Note: Sub-millisecond figures measure in-Worker V8 compute time (typical client HTTPS network RTT to the nearest Cloudflare PoP is 15–65 ms) · See Full Portfolio Benchmarks & Corpora →

5. Marketplace Plans & Payload Quotas

Plan Monthly Price Included Requests Rate Limit Max Request Payload Best For
BASIC $0.00 / month 500 / month (hard limit) 10 req / min 64 KB Evaluation, local development & CI smoke tests
PRO $9.99 / month 15,000 / month 60 req / min 128 KB Solo developers & production apps
ULTRA $29.99 / month 100,000 / month 300 req / min 256 KB Growing SaaS & multi-agent pipelines
MEGA $79.99 / month 500,000 / month 1,000 req / min 256 KB High-volume enterprise workloads

6. Frequently Asked Questions

How does this differ from the Broken JSON Healer API?

JSON Healer repairs syntax errors in raw JSON strings. Tool-Call Validator repairs syntax AND validates/coerces the resulting object against your target tool's JSON Schema across OpenAI, Anthropic, Gemini, and MCP envelopes.

What happens if a required field is completely missing?

If a default is defined in the schema, it is filled; otherwise valid is false and llm_retry_feedback provides an exact correction message to feed back to the LLM.

Which provider tool-call formats are supported?

OpenAI Chat Completions & Responses API, Anthropic tool_use (with snake_case input_schema), Google Gemini functionCall, and MCP JSON-RPC 2.0 tools/call (with camelCase inputSchema).

Zero Payload Logging

7. Data Handling, Privacy & Marketplace Proxy Disclosure

Processed strictly in volatile Worker memory; tool arguments and schemas are never logged.

Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled in configuration (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Payloads are processed strictly in volatile V8 memory and never logged or stored by Tinplate.

Marketplace Proxies vs. Direct Bearer Key: Requests sent via RapidAPI or Zyla API Hub pass through those marketplaces' proxy infrastructure (subject to their respective privacy policies). Security-sensitive workloads requiring end-to-end zero-intermediary processing can connect directly to https://api.tinplate.dev using a Direct Bearer Key (Authorization: Bearer <API_KEY>). Read our full Privacy Notice and OpenAPI 3.0.3 JSON Schema.

Related Tinplate APIs

🩹 POST /v1/json-heal Live on Hub

Broken JSON & LLM Output Healer API

Repair malformed or truncated LLM JSON outputs into valid, schema-checked JSON in 1 ms.

🔍 POST /v1/mcp-manifest-linter Tier 1

MCP Server Manifest & Tool Security Linter API

Audit MCP server manifests for hidden tool poisoning, shell risks, and excessive permissions.

🔒 POST /v1/prompt-guard Live on Hub

Prompt Injection Detection API

Catch prompt injections, role hijacks, and encoded jailbreaks in user inputs and RAG chunks.