JSON schema errors group

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

Group batch JSON Schema errors by failing schema rule or data path; exact counts and record indexes, stable order.

Use when you need to: which schema rule fails most across my generated records · summarize batch json schema errors by keyword location · group validation errors by json pointer data path across records.

Decide before calling

Read the versioned contract and the supported scope below. Reuse json-schema-errors-group@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-group@1.0.0 for which schema rule fails most across my generated records. 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:

{
  "results": [
    {
      "index": 0,
      "valid": true,
      "errors": [],
      "truncated": false
    },
    {
      "index": 1,
      "valid": false,
      "errors": [
        {
          "keyword_location": "/properties/qty/minimum",
          "instance_location": "/qty",
          "keyword": "minimum",
          "params": {
            "limit": 1
          }
        }
      ],
      "truncated": false
    },
    {
      "index": 2,
      "valid": false,
      "errors": [
        {
          "keyword_location": "/required",
          "instance_location": "",
          "keyword": "required",
          "params": {
            "property": "sku"
          }
        },
        {
          "keyword_location": "/properties/qty/minimum",
          "instance_location": "/qty",
          "keyword": "minimum",
          "params": {
            "limit": 1
          }
        }
      ],
      "truncated": false
    }
  ]
}

Response:

{
  "result": {
    "group_by": "keyword_location",
    "result_count": 3,
    "invalid_count": 2,
    "error_count": 3,
    "incomplete": false,
    "groups": [
      {
        "key": "/properties/qty/minimum",
        "keywords": [
          "minimum"
        ],
        "error_count": 2,
        "item_count": 2,
        "item_indexes": [
          1,
          2
        ]
      },
      {
        "key": "/required",
        "keywords": [
          "required"
        ],
        "error_count": 1,
        "item_count": 1,
        "item_indexes": [
          2
        ]
      }
    ]
  }
}

How to call it

MCP

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

{
  "id": "json-schema-errors-group",
  "version": "1.0.0",
  "input": {
    "results": [
      {
        "index": 0,
        "valid": true,
        "errors": [],
        "truncated": false
      },
      {
        "index": 1,
        "valid": false,
        "errors": [
          {
            "keyword_location": "/properties/qty/minimum",
            "instance_location": "/qty",
            "keyword": "minimum",
            "params": {
              "limit": 1
            }
          }
        ],
        "truncated": false
      },
      {
        "index": 2,
        "valid": false,
        "errors": [
          {
            "keyword_location": "/required",
            "instance_location": "",
            "keyword": "required",
            "params": {
              "property": "sku"
            }
          },
          {
            "keyword_location": "/properties/qty/minimum",
            "instance_location": "/qty",
            "keyword": "minimum",
            "params": {
              "limit": 1
            }
          }
        ],
        "truncated": false
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/json-schema-errors-group/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"results":[{"index":0,"valid":true,"errors":[],"truncated":false},{"index":1,"valid":false,"errors":[{"keyword_location":"/properties/qty/minimum","instance_location":"/qty","keyword":"minimum","params":{"limit":1}}],"truncated":false},{"index":2,"valid":false,"errors":[{"keyword_location":"/required","instance_location":"","keyword":"required","params":{"property":"sku"}},{"keyword_location":"/properties/qty/minimum","instance_location":"/qty","keyword":"minimum","params":{"limit":1}}],"truncated":false}]}'

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

CLI

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

Get the client at /clients/cli/.