Skip to main content
Glama

ai_extract_json

Pull named fields out of unstructured text (emails, invoices, listings, bios) and get them back as a JSON object, with null for anything not present. Use to turn messy text into structured data for an agent. Costs $0.002 in USDC on Base per successful call, paid with x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesSource text, up to 12,000 characters
fieldsYesComma-separated field names to extract (1-30)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations cover the safety profile, and the description adds genuinely non-obvious context: the $0.002 USDC-on-Base cost, the x402 payment mechanism, and that missing fields come back as null. This explains why readOnlyHint=false (it is a paid call, not a free read). It does not mention rate limits or failure/refund behavior, keeping it out of 5 territory.

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?

Three compact sentences, front-loaded with what the tool does and its output, then usage, then cost. No filler. Slightly more could be trimmed, but every sentence carries information.

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 correctly explains the return value (a JSON object with nulls for absent fields). Inputs are covered by the schema and payment by the description. Only error/edge behavior is left implicit, which is minor for a simple extraction tool.

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 (text with its 12,000-char limit, fields with its 1-30 comma-separated constraint) are already fully documented. The description adds no syntax or format detail beyond the schema, which is the baseline-3 case.

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 (pull/extract) and resource (named fields from unstructured text) plus the output shape (JSON object with nulls). The examples (emails, invoices, listings, bios) make the resource concrete. It does not explicitly differentiate from lookalike siblings such as `extract` and `text_extract`, so it stops short of a 5.

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 to turn messy text into structured data for an agent" gives a clear context for when to reach for it, and the examples reinforce that. There is no when-not guidance and no named alternative among the many `ai_*`/`extract*` siblings, so it is context without exclusions.

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