Skip to main content
Glama

Util JSON validate

util_json_validate
Read-onlyIdempotent

Use when you must check that a JSON document fits a schema before acting on it: validates json against a JSON Schema subset. Returns the exact paid x402 request for your input (GET /util/json-validate, $0.001 per call), with the response schema and an example; call that URL with an x402 or MPP client to get the data. Bad input is refused before any charge. With a P0 access key (header Authorization: Bearer p0k_…, buy one at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5) this tool makes the paid call itself and returns the data, deducting the listed price.

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.3/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing price ($0.001 per call), the endpoint (GET /util/json-validate), the payment protocols accepted (x402/MPP), that bad input is refused before any charge, and the exact auth header format and key purchase URL for direct execution. Nothing contradicts the readOnly/idempotent/non-destructive annotations.

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 trigger condition, then the mechanics. Sentences are dense but each carries information; the payment/key paragraph is long but operationally necessary. Minor redundancy in 'call that URL with an x402 or MPP client to get the data' following the prior sentence.

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

Completeness4/5

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

With no output schema, the description shoulders the return-value burden: it explains the response schema and example come back with the paid request, or that the data is returned directly with a P0 key. However it never says what a validation result actually looks like (valid flag, error list), leaving a gap for a two-parameter tool whose whole output is that verdict.

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 description coverage is 100%, so both `json` and `schema` are already documented in the schema. The description restates the domain ('json document', 'schema') but adds no format or size guidance beyond structured fields, 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') and frames it with a concrete decision point ('check that a JSON document fits a schema before acting on it'). This clearly separates it from the other util_* siblings such as util_base64 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?

'Use when you must check that a JSON document fits a schema before acting on it' gives an explicit triggering condition. It also explains the two invocation modes (raw x402/MPP request vs. P0 key), though it does not state when NOT to use it or contrast with siblings.

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