JSON schema output validate

json-schema-output-validate · version 1.0.0 · JSON & JSONL · free, no key needed

Validate JSON (e.g. LLM output) against a Draft 2020-12 schema subset; returns spec output units with JSON Pointers.

Use when you need to: validate llm structured output against draft 2020-12 json schema · check model json response matches a 2020-12 schema · json schema 2020-12 basic output with keyword and instance locations.

Decide before calling

Read the versioned contract and the supported scope below. Reuse json-schema-output-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use json-schema-output-validate@1.0.0 for validate llm structured output against draft 2020-12 json schema. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "schema": {
    "type": "object",
    "required": [
      "name",
      "age"
    ],
    "properties": {
      "name": {
        "type": "string"
      },
      "age": {
        "type": "integer",
        "minimum": 0
      }
    },
    "additionalProperties": false
  },
  "instance": {
    "name": "Ada",
    "age": -1,
    "extra": true
  }
}

Response:

{
  "result": {
    "valid": false,
    "truncated": false,
    "errors": [
      {
        "kind": "branch",
        "keyword_location": "",
        "instance_location": ""
      },
      {
        "kind": "assertion",
        "keyword_location": "/properties/age/minimum",
        "instance_location": "/age",
        "keyword": "minimum",
        "params": {
          "limit": 0
        }
      },
      {
        "kind": "assertion",
        "keyword_location": "/additionalProperties",
        "instance_location": "/extra",
        "keyword": "additionalProperties",
        "params": {
          "property": "extra"
        }
      }
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "json-schema-output-validate",
  "version": "1.0.0",
  "input": {
    "schema": {
      "type": "object",
      "required": [
        "name",
        "age"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "age": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "instance": {
      "name": "Ada",
      "age": -1,
      "extra": true
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-schema-output-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"schema":{"type":"object","required":["name","age"],"properties":{"name":{"type":"string"},"age":{"type":"integer","minimum":0}},"additionalProperties":false},"instance":{"name":"Ada","age":-1,"extra":true}}'

The machine-readable contract is at /v1/tools/json-schema-output-validate/versions/1.0.0.

CLI

node cli.mjs run json-schema-output-validate 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.