Skip to main content
Glama

Util JSON validate

util_json_validate
Read-onlyIdempotent

Use when you need to check that a JSON document fits a schema before acting on it: validates json against a JSON Schema subset. Returns the paid x402 request for your input (GET /util/json-validate, $0.001 per call; schema linked). Call that URL with an x402 or MPP client to get the data. Bad input is refused before any charge. Returns valid, every violation with its path, and the schema keywords it ignored. First call each day returns the data itself, free; later calls return the paid request.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "json": "<json>",
      "schema": "<schema>"
    },
    "name": "util_json_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesThe document (JSON text; an object in a POST body is accepted too)
schemaYesJSON Schema (subset) as JSON text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations by disclosing the x402 payment flow ($0.001 per call), that bad input is refused before any charge, that the first call each day returns data free while later calls return a paid request, and what the result contains. The only ambiguity is the interplay between 'returns the paid request' and 'returns valid, every violation' — the reader must infer that these are the two response modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the use case and contains no filler, but the middle section is tangled: the paid-request return and the validation-result return are introduced out of order, forcing a re-read to reconcile the two modes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only validator with no output schema, the description covers the payment mechanics, pre-charge validation, free-tier behavior, and the shape of the validation result. An agent has everything needed to call it and interpret the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for both parameters, so the schema already documents 'json' and 'schema' including length limits and the POST-body alternative. The description adds no parameter-level detail beyond noting the schema is a 'subset', so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('validates json against a JSON Schema subset') plus the precondition it serves ('check that a JSON document fits a schema before acting on it'). This is clearly distinct from the sibling utilities such as util_base64, util_hash, or util_jwt_decode.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete when-to-use trigger ('before acting on it') and explains the invocation path with an x402/MPP client. It stops short of naming exclusions or alternatives, but the surrounding utility siblings are unrelated enough that this is a minor gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources