Skip to main content
Glama

P0: agent memory and utilities

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 a link to the full schema; 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. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds meaningful context beyond them: the $0.001 per-call price, that it returns a prebuilt x402 request rather than the result, and that bad input is refused before any charge. The auth mechanism (Authorization: Bearer p0k_…) and key-purchase URL are also disclosed. It stops short of describing what a successful validation result actually looks like.

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

Conciseness3/5

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

The usage condition is correctly front-loaded, but the description then becomes a dense run-on covering payment flow, URL, price, error behavior, key acquisition, and dual-mode operation in a single block. The 'call that URL with an x402 or MPP client to get the data' clause is partially redundant with the preceding 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?

For a two-parameter, read-only tool with no output schema, the description covers cost, access prerequisites, no-charge-on-invalid-input, and the two invocation paths. The main omission is the shape of the returned validation outcome (valid flag vs. list of schema errors), which the absent output schema would otherwise have supplied.

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 parameters are already documented in the schema, including the note that an object in a POST body is accepted. The description adds no extra meaning about the 'json' or 'schema' inputs, so the baseline applies.

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

Purpose4/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'. That is unambiguous and distinguishable from siblings like util_hash or util_jwt_decode. It never explicitly says how it differs from other util_* tools, but the resource noun is distinct enough that an agent can route on it.

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 clear triggering condition: 'Use when you must check that a JSON document fits a schema before acting on it'. It also distinguishes the two operating modes (no key = returns a paid request URL, P0 key = performs the paid call and returns data). No alternative tool is named, which is the only 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