API & MCP
Everything a person can do on Structured Output Validator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://structuredoutputvalidator.usefulweb.site/api/v1/calculate– run Structured Output ValidatorGET https://structuredoutputvalidator.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Structured Output Validator
Paste a JSON Schema (or an OpenAI/Anthropic/MCP wrapper around one) and the model's output. The tool extracts the JSON from markdown code fences or surrounding prose, reports syntax errors with exact line and column, validates against a draft 2020-12 subset (types, required, additionalProperties, enum, const, ranges, lengths, patterns, items, anyOf/oneOf/allOf, local $ref and more) with human explanations and hints for typical LLM mistakes, and suggests a repaired JSON only for trivial issues such as code fences or trailing commas.
| Field | Type | Default | Description |
|---|---|---|---|
schema (required) | textarea | — | JSON Schema. Plain schema or a response_format / function-tool wrapper. |
output (required) | textarea | — | AI output. Raw model output; code fences and prose around the JSON are handled. |
maxErrors | integer | 50 | Maximum errors listed |
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://structuredoutputvalidator.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
structured_output_validator - Local stdio connector:
node src/mcp-stdio.ts --tool=structured-output-validator
{
"mcpServers": {
"structured-output-validator": { "type": "http", "url": "https://structuredoutputvalidator.usefulweb.site/mcp" }
}
}