JSON schema errors format

json-schema-errors-format · version 1.0.0 · JSON & JSONL · free, no key needed

Render JSON Schema output units as a 2020-12 basic or flag output document with fixed English error messages.

Use when you need to: turn json schema validation units into readable error messages · json schema 2020-12 basic output document from error units · error messages for llm retry prompt from schema validation errors.

Decide before calling

Read the versioned contract and the supported scope below. Reuse json-schema-errors-format@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-errors-format@1.0.0 for turn json schema validation units into readable error messages. 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:

{
  "errors": [
    {
      "kind": "assertion",
      "keyword_location": "/properties/age/minimum",
      "instance_location": "/age",
      "keyword": "minimum",
      "params": {
        "limit": 0
      }
    },
    {
      "kind": "assertion",
      "keyword_location": "/required",
      "instance_location": "",
      "keyword": "required",
      "params": {
        "property": "name"
      }
    }
  ],
  "order": "instance_location"
}

Response:

{
  "result": {
    "valid": false,
    "errors": [
      {
        "keyword_location": "/required",
        "instance_location": "",
        "error": "Required property 'name' not found."
      },
      {
        "keyword_location": "/properties/age/minimum",
        "instance_location": "/age",
        "error": "Expected a value at least 0."
      }
    ]
  }
}

How to call it

MCP

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

{
  "id": "json-schema-errors-format",
  "version": "1.0.0",
  "input": {
    "errors": [
      {
        "kind": "assertion",
        "keyword_location": "/properties/age/minimum",
        "instance_location": "/age",
        "keyword": "minimum",
        "params": {
          "limit": 0
        }
      },
      {
        "kind": "assertion",
        "keyword_location": "/required",
        "instance_location": "",
        "keyword": "required",
        "params": {
          "property": "name"
        }
      }
    ],
    "order": "instance_location"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-schema-errors-format/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"errors":[{"kind":"assertion","keyword_location":"/properties/age/minimum","instance_location":"/age","keyword":"minimum","params":{"limit":0}},{"kind":"assertion","keyword_location":"/required","instance_location":"","keyword":"required","params":{"property":"name"}}],"order":"instance_location"}'

The machine-readable contract is at /v1/tools/json-schema-errors-format/versions/1.0.0.

CLI

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

Get the client at /clients/cli/.