jsonrepair, Ajv, quicktype or InvokePort?
Three excellent open-source libraries and one hosted toolset solve overlapping parts of the same problem: getting usable JSON out of a model. Here is when each is the right choice — including when you do not need InvokePort at all.
Side by side
| Need | jsonrepair | Ajv | quicktype | InvokePort |
|---|---|---|---|---|
| What it is | JavaScript library and CLI | JavaScript JSON Schema validator | Code generator (CLI, library, web app) | Hosted tools over HTTP, remote MCP and a local MCP connector |
| Repair malformed LLM JSON | Yes — its core job | No | No | Yes (uses jsonrepair) and reports whether anything changed |
| JSON Schema validation | No | Full standard: $ref, formats, composition | No | Bounded subset: no $ref, patterns, formats or composition |
| Types from example JSON | No | No | Many target languages | TypeScript and a starting JSON Schema |
| Runs inside your process, no network | Yes | Yes | Yes | Browser tools yes; API and MCP are network calls |
| An agent without code execution can call it | No | No | No | Yes — typed MCP tools |
| Per-agent keys, tool allowlist, quota and call journal | Not applicable | Not applicable | Not applicable | Yes |
| Cost | Open source | Open source | Open source | Free browser tools and paid reports priced per call in USDC |
Based on each project's public documentation as of November 2026. Library capabilities change; follow the links for the current state.
01Use a library when you control the code
If your own service parses model output, a library in-process is faster, cheaper and has no network failure mode. jsonrepair fixes syntax, Ajv validates against the full JSON Schema standard, and quicktype generates types in many languages. InvokePort's own repair tool uses jsonrepair.
02Use InvokePort when the agent cannot run code
Agents inside chat apps, no-code automations and browser agents often cannot install a package. InvokePort gives them repair, bounded validation, CSV export and type inference as typed MCP tools, each behind a key with its own allowlist, quota and call journal.
03Use a report when one pass/fail is not enough
The paid LLM Output Batch Validator checks up to 200 outputs against one schema and returns the valid rate, which outputs needed repair and the most common failing paths — the number you want before changing a prompt or a model.
Questions
Should I use InvokePort instead of jsonrepair in my own code?
Usually not. If you control the code and only need repair, call jsonrepair directly: it is in-process and has no network dependency. InvokePort is useful when an agent needs repair, validation and export as callable tools without running code.
Is the InvokePort validator a replacement for Ajv?
No. It supports a bounded subset of JSON Schema. If you need $ref, formats, patterns or composition, use Ajv or another full validator.
When does a hosted tool make sense?
When the agent runs in a chat app, a no-code automation or a browser without code execution; when several agents should share one policy with per-agent keys, quotas and a journal; or when you want a report such as a batch valid rate rather than a single pass/fail.
Can I try InvokePort without an account?
Yes. Try a browser tool with no account. Free API and MCP calls use a scoped key.