Agent Tool-Call Validator & Repairer API
Validate and auto-repair broken LLM tool-call arguments against your JSON Schema.
Repair malformed or truncated LLM JSON outputs into valid, schema-checked JSON in 1 ms. Fix broken JSON from LLMs in under 2 ms: strip Markdown code fences, close truncated brackets, fix trailing commas, unescaped quotes, and Python literals.
{
"ok": true,
"data": {
"valid": true,
"data": {
"name": "Ada",
"active": true,
"tags": [
"ai",
"edge"
]
},
"healed_json": "{\"name\":\"Ada\",\"active\":true,\"tags\":[\"ai\",\"edge\"]}",
"repairs": [
"stripped_markdown_fence",
"normalized_single_quotes",
"normalized_literals",
"removed_trailing_commas",
"closed_truncated_containers"
],
"schema_valid": null,
"schema_errors": []
},
"meta": {
"request_id": "req_jh_01",
"ms": 1
}
}
curl -X POST "https://api.tinplate.dev/v1/json-heal" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TINPLATE_KEY" \
-d '{"raw":"Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", '\''active'\'': True, \"tags\": [\"ai\", \"edge\",]\n"}'import { TinplateClient } from "@tinplate/sdk";
const tinplate = new TinplateClient({
apiKey: process.env.TINPLATE_API_KEY!,
});
const { data, meta } = await tinplate.call("/v1/json-heal", {
"raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
});
console.log(`[${meta.ms} ms]`, data);import requests
response = requests.post(
"https://api.tinplate.dev/v1/json-heal",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
json={
"raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
}
)
print(response.json())const response = await fetch("https://api.tinplate.dev/v1/json-heal", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
body: JSON.stringify({
"raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
}),
});
const result = await response.json();
console.log(result);{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tinplate_json_heal",
"arguments": {
"raw": "Sure! Here is the JSON:\n```json\n{\"name\": \"Ada\", 'active': True, \"tags\": [\"ai\", \"edge\",]\n"
}
}
}POST /v1/json-heal)| Parameter | Type & Constraints | Description |
|---|---|---|
raw required |
stringminLen: 1, maxLen: 262144 |
Malformed JSON or LLM output string (max 256 KB). |
schema optional |
object |
Optional JSON Schema (draft subset) to validate the healed JSON against without eval. |
data Object Fields (200 OK)| Field | Type | Description |
|---|---|---|
valid |
boolean |
Field 'valid' |
data |
any | null |
Field 'data' |
healed_json |
string | null |
Field 'healed_json' |
repairs |
string[] |
Field 'repairs' |
schema_valid |
boolean | null |
Field 'schema_valid' |
schema_errors |
string[] |
Field 'schema_errors' |
Release: v1.0.39 ·
Verified: 16 November 2026 ·
Portfolio Median: 0.318 ms in-Worker V8 compute (add 15–65 ms HTTPS RTT) ·
See Full Portfolio Benchmarks →
Direct Polar All-Access Keys unlock all 42 APIs (49 endpoints), /v1/pipeline, and /mcp on api.tinplate.dev:
Pro ($29/mo · 120 req/min · 100k/mo · 128 KB) or Team ($79/mo · 300 req/min · 500k/mo · 256 KB).
| Plan | Monthly Price | Included Requests | Rate Limit | Max Payload | Best For |
|---|---|---|---|---|---|
| BASIC | $0.00 / mo | 500 / month | 10 req / min | 64 KB | Evaluation & CI smoke tests |
| PRO | $9.99 / mo | 15,000 / month | 60 req / min | 128 KB | Solo devs & production apps |
| ULTRA | $29.99 / mo | 100,000 / month | 300 req / min | 256 KB | Growing SaaS & multi-agent pipelines |
| MEGA | $79.99 / mo | 500,000 / month | 1,000 req / min | 256 KB | High-volume enterprise workloads |
Retrying an LLM call costs 500–3,000 ms and extra token fees. JSON Healer repairs 95%+ of syntax glitches deterministically in ~1 ms.
Yes. It tracks the open bracket/brace stack and closes unfinished strings, arrays, and objects cleanly.
Yes, the repairs array lists every transformation applied so you can audit or log repair frequency.
100% in-memory deterministic state machine. Zero payload logging.
Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Requests via RapidAPI or Zyla traverse marketplace proxies; use a Direct Bearer Key for zero-intermediary routing.
Validate and auto-repair broken LLM tool-call arguments against your JSON Schema.
Convert noisy web pages or raw HTML into clean, token-efficient Markdown for RAG.
Diff two OpenAPI 3.x or JSON Schemas to catch breaking changes and recommend SemVer bumps.