Skip to main content
Glama

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. Costs $0.001 in USDC on Base per successful call, paid with x402.

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
Behavior4/5

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

With annotations present, the bar is lower, and the description still adds real context: it discloses the x402 payment flow, the exact price ($0.001 USDC on Base), and that billing applies only per successful call, plus the return shape including line/column on failure. It does not explain the notable readOnlyHint=false / idempotentHint=false flags, but nothing here contradicts them.

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

Conciseness5/5

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

Three tight sentences: purpose first, then output shape, then usage trigger and cost. Every sentence carries information the agent needs and nothing is padded.

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 one-parameter validation tool with no output schema, the description covers purpose, return values (valid flag, type, size, error location), usage timing, and the cost/payment model. An agent has everything needed to decide and invoke correctly.

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?

There is a single parameter and schema coverage is 100%, with the schema itself documenting the 'text' field and its 20,000-character limit. The description adds no syntax or format detail beyond that, so the baseline 3 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?

The description states a specific verb and resource ('Check whether text is valid JSON') and even enumerates the result fields, so the agent immediately knows this is a validation/parse-check tool. It does not name the closely related siblings (json_format, json_minify, json_repair) to draw the boundary explicitly, which keeps it out of 5 territory.

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 before parsing an LLM's or an API's output' gives a concrete, actionable trigger for calling the tool. There is no explicit when-not guidance or pointer to json_repair for malformed input, so it falls short of full routing guidance.

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