Skip to main content
Glama

Agent Data Tools: Utilities

Validate JSON

json_validate

Check whether text is valid JSON. Returns valid true/false, the parsed value's type and size, and for invalid input the error message with line and column. Use before parsing an LLM's or an API's output. Example: text={"a":1}. Price $0.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only; not marked read-only because each call is charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe JSON text to check (up to 20,000 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: pricing model ($0.003/call via x402 USDC or card key), the first-25-free allowance, and that failed calls are free. It also explicitly reconciles the readOnlyHint=false annotation by explaining that the call is charged, so the description and annotations are consistent rather than contradictory.

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 purpose, then return shape, trigger, example, and pricing in that order. Every sentence carries information, though the pricing/auth sentence is dense and slightly crowds out structural clarity.

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?

There is no output schema, so the description correctly spells out the return values (valid flag, parsed type/size, error line/column). Combined with cost, auth path, and the free-tier note, an agent has everything needed to decide and invoke.

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% and the single 'text' parameter is fully documented there, so the baseline is 3. The inline example (text={"a":1}) and the usage framing add marginal value but no format or syntax detail the schema lacks.

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 ('Check whether text is valid JSON') and enumerates the outputs (valid true/false, parsed type and size, error line/column). The purpose is unambiguous, but it never names a sibling (json_repair, json_format) to disambiguate from the other JSON tools in the family.

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 trigger: 'Use before parsing an LLM's or an API's output.' That is a clear when-to-use context. It stops short of stating when not to use it or routing invalid input to a sibling like json_repair.

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.