Skip to main content
Glama

extract_json

Turn unstructured text (emails, invoices, listings, bios) into structured JSON conforming to your JSON Schema — reply is parse-validated with an automatic retry, so you get JSON or a clean failure. $0.01/call via x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesSource text to extract from (truncated to 8,000 characters)
schemaYesJSON Schema object the output must conform to

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does excellently: it discloses parse-validation, automatic retry, and a clean failure mode. It also mentions cost. These behavioral traits go well beyond the schema, which only defines the inputs.

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?

The description is a single, well-structured sentence that front-loads the main purpose, then adds behavioral details and cost. Every clause earns its place with no wasted words.

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 simple two-parameter tool with no output schema, the description adequately covers purpose, behavior, failure modes, and cost. It does not need to explain return values since the output is described as JSON or a clean failure, and the schema param is self-explanatory.

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 coverage is 100%, so the schema already documents both parameters. The description adds examples of text types but no additional syntax or constraints beyond the schema. The baseline of 3 is appropriate; the description does not meaningfully enhance parameter understanding.

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?

The description clearly states it converts unstructured text into structured JSON using a provided JSON Schema, with specific examples (emails, invoices, listings, bios). This is a specific verb+resource and distinguishes it from siblings like extract_keywords or classify_text.

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?

It provides clear context for when to use the tool (when you have unstructured text and a JSON schema), but it does not explicitly name alternatives or exclusion criteria. The use case is well-defined, but no 'vs alternatives' guidance is given.

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.