Skip to main content
Glama

ai_extract

Read-onlyIdempotent

Unstructured text → structured JSON, one call — Turn ANY text into clean, schema-enforced JSON: pass text= plus the fields you want (fields=name,email,price,date — up to 10) and get exactly those keys back, guaranteed-valid JSON via Claude structured outputs. Add list=true to extract EVERY repeated record (invoice lines, listings, table rows) as an array. Up to 16K chars per call. Not crypto-specific — the universal parse step for agent pipelines: pages, emails, receipts, logs. Many documents? ai-extract-batch: 10 in one call for $0.10. Required input: text. Priced $0.05 per call over x402 on Base; send a prepaid x-credit-token header for unlimited calls, or get 1 free call/day per tool. No wallet or API key required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listNoExtract all records (true/false)
textYesSource text
fieldsNoFields (comma-separated)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoThe result payload. Shape is service-specific; every field is documented in the tool description.
serviceNoThe service id that answered.
checkedAtNoISO-8601 timestamp of when the underlying reads were taken.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / data / description
      Previous value: -"The result payload. Shape is service-specific; every field is documented in the service description above."New value: +"The result payload. Shape is service-specific; every field is documented in the tool description."
  2. Changed1 schema field changed
    • removedOutput schema / required
      Removed value: -[
      -  "data"
      -]
  3. Added

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds substantial behavioral context: guaranteed-valid structured outputs, exact-key behavior, list extraction semantics, character limits, pricing model, and authentication requirements (x-credit-token header, no wallet/API key). No contradiction with annotations.

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 dense but every sentence earns its place: purpose, parameter usage, list behavior, size limit, sibling routing, pricing, and auth are all relevant for an agent. It is front-loaded with the core value proposition and wastes no 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?

Given the presence of an output schema, the description does not need to explain return structure. It covers required input, optional parameters, limits, use cases, alternatives, billing, and authentication, making it fully actionable for an agent with no prior context.

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

Parameters5/5

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

While schema coverage is 100%, the description goes far beyond the schema: it explains fields as a comma-separated list up to 10 items, clarifies list=true returns an array of repeated records, and confirms text is required. This adds meaningful invocation details beyond the bare parameter descriptions.

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 uses a specific verb and resource: converting unstructured text into schema-enforced JSON via extraction. It clearly distinguishes itself from siblings by noting it is 'the universal parse step' and explicitly routes large jobs to ai-extract-batch.

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?

It specifies when to use this tool ('pages, emails, receipts, logs'), when to add list=true for repeated records, and names the batch alternative for many documents. It also gives concrete constraints like 16K chars and required input text, so an agent can decide to invoke it confidently.

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