Skip to main content
Glama

Agent Data Tools: AI

Extract fields from text as JSON

ai_extract_json
Read-only

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. Price $0.003/call via x402 USDC or a card key (/credits); failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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

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

Annotations already declare readOnlyHint=true, destructiveHint=false and idempotentHint=false, and the description adds genuinely new operational context: $0.003 per call via x402 USDC or a card key, failed calls free, and repeats are not free (which explains the non-idempotent annotation). The 'reads or computes only' clause largely restates the annotations, so it falls short of a 5.

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 is front-loaded in the first clause, followed by output semantics and then billing constraints, with no filler sentences. Slight redundancy in the 'reads or computes only and changes nothing' clause, which duplicates the readOnly/destructive annotations.

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 usefully states the return shape ('JSON object, with null for anything not present') and covers cost and failure behavior. Nothing essential for correct invocation is missing, though edge behaviors such as oversized input or field-count violations are left to the schema.

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, fields) are already documented with their limits (12,000 characters, 1-30 fields). The description adds no syntax or format detail beyond that, so the baseline of 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 names a specific verb and resource ('Pull named fields out of unstructured text') and even enumerates source types (emails, invoices, listings, bios), so the operation is unambiguous. It does not explicitly differentiate itself from siblings such as ai_classify or ai_summarize_text, which keeps it short of a 5 under the rubric.

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

Usage Guidelines3/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' states a general context but gives no when-to-use conditions, no exclusions, and does not name a sibling alternative for the adjacent tasks (classification, summarization). Usage is implied rather than guided.

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.