Skip to main content
Glama

util_json_validate

Read-only

JSON Schema validator — Validate a JSON document against a JSON Schema (draft-07 / 2019-09 / 2020-12 keywords): type, enum, const, numeric and string limits, pattern, formats (email, date, date-time, uuid, uri, ipv4, ipv6, hostname), arrays (items, prefixItems, contains, uniqueItems), objects (required, properties, patternProperties, additionalProperties, dependentRequired), allOf/anyOf/oneOf/not, if/then/else and local $ref/$defs. Returns valid plus a list of errors with JSON-pointer instance and schema paths. Pass data= and schema= as JSON strings; optional schema_url= to fetch a schema instead. Offline, instant. Price: $0.002 USDC (Base, via x402).

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": {
      "data": "<data>",
      "schema": "<schema>"
    },
    "name": "util_json_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYese.g. {"name":"Ada","age":-3,"email":"ada@example"}
schemaYese.g. {"type":"object","required":["name","age","email"],"properties":{"name":{"type":"string"},"age":{"type":"integer","minimum":0},"email":{"type":"string","format":"email"}},"additionalProperties":false}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description adds genuinely useful context beyond that: supported drafts, the return shape (valid plus errors with JSON-pointer instance and schema paths), that the check is offline and instant, and that invocation costs $0.002 USDC via x402 — a real gating detail for an agent. Note that 'offline, instant' sits awkwardly with openWorldHint=true, though it is not a direct contradiction.

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-loaded with the core verb and resource, then the capability list, then the return value and invocation mechanics. The keyword enumeration is dense but earns its place for a validator; only the nonexistent schema_url clause is wasted/misleading text.

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 two-parameter, read-only validator with no output schema, the description supplies the return shape, the supported draft surface, the execution profile, and the payment requirement. Everything an agent needs to call it correctly is present, apart from the erroneous schema_url mention.

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

Parameters2/5

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

Schema coverage is 100% so the baseline would be 3, and the description does clarify that data and schema are passed as JSON strings. However it advertises an 'optional schema_url=' parameter that does not exist in the input schema, and frames schema as substitutable ('instead') when it is actually required — a misleading addition that could cause a failed call.

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 ('Validate a JSON document against a JSON Schema') and enumerates the exact keyword surface covered, which cleanly separates it from siblings like util_json_schema (schema generation) and ai_json_repair (repair). An agent can tell what this does without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied by the capability list and by the instruction to pass data= and schema= as JSON strings, but there is no explicit when-to-use/when-not guidance and no sibling is named as an alternative. The intended niche is inferable but not routed.

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