Skip to main content
Glama

ai_extract_batch

Read-only

Batch field extraction to table — Pull the same fields out of up to 20 texts in one call and get a table back (rows + CSV). texts = items separated by | or newlines, or a JSON array (each up to 2,000 chars). fields = comma-separated names, each optionally with a hint after a colon (e.g. amount:total in USD). The model copies values as written and returns null when a value is not stated; every value is then checked OFFLINE against its own source text, and values not found there are listed as ungrounded (possible hallucination). Also returns fill rate per field and a GROUNDED / REVIEW_FEW / REVIEW verdict. Workers AI llama-3.3-70b. Price: $0.015 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "texts": "<texts>",
      "fields": "<fields>"
    },
    "name": "ai_extract_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
textsYese.g. Invoice from Acme Corp for $1,250.00 due Dec 5, contact jane@acme.com|Globex billed us 980 USD, email bob@globex.io
fieldsYese.g. company,amount,email,due_date

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?

Beyond the annotations (readOnly, openWorld, non-destructive), the description discloses the extraction policy (copy values as written, null when not stated), an offline grounding check that flags ungrounded values as possible hallucination, fill rate per field, and a GROUNDED/REVIEW_FEW/REVIEW verdict. It also names the underlying model and the $0.015 USDC x402 payment requirement, which the agent could not learn from structured fields.

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?

It is a single dense paragraph with the core action front-loaded and no filler sentences; each clause carries information. Readability would improve if the input formats, grounding behavior, and pricing were separated, since the payment and verdict details are buried mid-paragraph.

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?

There is no output schema, and the description fully compensates by describing the return shape (rows plus CSV), the per-field fill rate, the ungrounded-value list, and the overall verdict. For a two-parameter batch tool with annotations already covering safety, nothing an agent needs to invoke or interpret it is missing.

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?

Schema coverage is already 100%, but the description still adds real meaning: texts may be pipe-separated, newline-separated, or a JSON array with a 2,000-character cap per item, and fields accept an optional hint after a colon (e.g. 'amount:total in USD'). That syntax and the hint convention go well beyond the schema's bare examples.

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 opens with a specific verb and resource ('Batch field extraction to table') and quantifies scope ('up to 20 texts in one call'), so an agent knows exactly what it produces. It does not name a sibling such as ai_extract for single-text extraction, leaving the batch-vs-single distinction implicit rather than explicit.

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 gives clear context for use: pull the same fields out of many texts at once, up to 20 per call, with a stated per-item limit of 2,000 characters. There are no explicit exclusions or named alternatives for the single-item or specialized cases (invoice/receipt/RFP extraction), so the agent must infer when this tool is the wrong choice.

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