Skip to main content
Glama

JSON shape ($0.15)

json_shape
Read-only

Turn messy text into structured JSON. Parses a JSON blob or key: value lines (up to 50,000 characters) into an object using the field names given in schema_hint, and returns notes on what matched. Rule-based parsing with no LLM, so results are fast and predictable. Useful for normalizing tool output, logs or form dumps before further processing. Not for free-form language understanding or writing. Price: $0.15 USDC per call (x402 on Base) or 1 prepaid pack credit. Failed calls aren't charged when you pay per call with x402: if the job errors, the USDC payment is never settled. With pack credits (X-Entitlement-Key), a call that fails gives its credit back.

Input Schema

NameRequiredDescriptionDefault
textYesRaw text or JSON to reshape (≤50k chars)
schema_hintYesFree-text hint of desired field names / shape

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the readOnly/openWorld annotations by disclosing that parsing is rule-based with no LLM (so deterministic and fast), the 50k character input ceiling, and the billing behavior including non-charge on error for both x402 and pack-credit paths. The only gap is that the shape of the returned 'notes' is never characterized.

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?

Purpose and scope are front-loaded in the first two sentences, with usage and pricing trailing appendices. The billing paragraph is long relative to the parsing content, though it earns some place given this is a paid tool with two payment paths.

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 must carry the return contract, and it does partially (object built from schema_hint names, plus match notes). An agent would still like to know how unmatched fields or parse failures are reported, which is the remaining hole for a two-parameter tool whose annotations are minimal.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: schema_hint determines the field names of the output object rather than being a mere format flag. The 50k limit is repeated from the schema, which is the only redundancy.

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 ('Turn messy text into structured JSON') plus the two accepted input forms (JSON blob or key: value lines) and the output contract (object keyed by schema_hint field names, plus match notes). This is far more specific than any sibling (brief, page_extract, url_probe), which do unrelated work.

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

Usage Guidelines5/5

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

Gives concrete positive contexts ('normalizing tool output, logs or form dumps before further processing') and an explicit exclusion ('Not for free-form language understanding or writing'), which is exactly the boundary an agent needs to not confuse this with an LLM extraction tool.

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