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 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 (no free tier on this tool). No API key required.

Input Schema

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

Output 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

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/non-destructive, and the description adds substantial context they cannot carry: 16K char cap, max 10 fields, list-mode array semantics, $0.05 per call over x402, prepaid x-credit-token header for unlimited calls, and no free tier. Payment and quota behavior is exactly the kind of trait an agent needs before invoking.

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?

The core transformation leads, followed by the highest-value mechanics (fields, list), limits, and the batch/pricing routing. It is dense and information-packed rather than padded, though the promotional framing ('ANY', 'guaranteed-valid') and stacked pricing sentences cost it a point.

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?

An output schema exists so return values need not be described, and for a 3-parameter read-only extraction tool the description covers inputs, limits, cost, auth header, and the batch alternative. Nothing an agent needs to call it correctly is missing.

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?

With 100% schema coverage the baseline is 3, but the description genuinely enriches the parameters: fields is capped at 10 and comma-separated, and list=true means 'extract EVERY repeated record as an array' rather than a single object. That 'true vs absent' distinction materially changes the call and is not spelled out in the schema.

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 concrete verb+resource transformation ('Unstructured text → structured JSON') and names the output guarantee (schema-enforced JSON). It also distinguishes itself from siblings by explicitly denying a crypto-specific scope and pointing to ai-extract-batch for the multi-document case, so an agent can place it without opening the schema.

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?

Gives concrete usage contexts ('pages, emails, receipts, logs') and names the alternative for a different condition ('Many documents? ai-extract-batch'). It stops short of an explicit when-not-to-use statement beyond that routing hint, keeping it below the top band.

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