Skip to main content
Glama

agentpay — card-funded wallets for AI agents

Extract typed fields

extract

Extract typed values from messy text or receipts. Pays Fuse extract; agentpay settles the standard x402 v2 BSV 402 from this wallet. Prefer this over chat when you need structured fields with confidence scores and explicit nulls (p_null) instead of made-up answers. Types: text|number|date|time|datetime|duration|list|estimate|forecast (lists need items, e.g. "text"). fields is a name→{type} object. Tiers: S 3,500 sats (≤1,500 chars, ≤8 fields), M 15,000 (≤6,000 chars, ≤30 fields), L 50,000 (≤16,000 chars, ≤30 fields); images (base64 PNG/JPEG/WebP) are at least M. Oversized → 413, bad schema → 400. Returns answers, receipt, and txid. Pass dryRun to quote the tier and price without spending.

Input Schema

NameRequiredDescriptionDefault
keyNoAgent key (agp_…). Optional when the MCP connection sends Authorization: Bearer.
refNo
stateNoMessy text, receipt, email, or notes. Required unless images are sent.
dryRunNoQuote the extract tier (S/M/L) and price only, no debit or settlement
fieldsYesFuse wire format: object mapping field names to {type, items?}. An array of {name, type} is also accepted.
imagesNoBase64 PNG, JPEG, or WebP (or data URI). Remote URLs are rejected. Image requests are at least M.
approvalIdNoApproval id from a prior approval_required response
amountCentsNoOverride the USD cents charged (min 1 cent default)
descriptionNo
reference_dateNoYYYY-MM-DD (or ISO datetime) used to resolve relative dates like 'yesterday'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the settlement path, tier pricing/limits, error codes (413 oversized, 400 bad schema), return values (answers, receipt, txid), and a dryRun quote mode. Gaps remain (whether payment approval is required, rate limits) and the "standard x402 v2 BSV 402" phrase is opaque jargon rather than useful context.

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?

Dense and front-loaded: purpose, then routing, then types, then pricing, then return/quote behavior. Most sentences earn their place, though the settlement-mechanics sentence is jargon-heavy and could be tighter.

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?

For a 10-parameter, no-annotation, no-output-schema tool, the description covers purpose, alternatives, pricing, limits, error codes, and returns. Minor omissions (approval flow via approvalId, reference_date for relative dates) are documented in the schema itself.

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?

Schema coverage is 80%, so baseline is 3, but the description adds real meaning: the type enum semantics, that lists require items, the name→{type} shape, and that input size drives the tier/price (≤1,500 chars vs ≤16,000). It also flags that images force at least the M tier, which the schema only implies.

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 specific verb and resource ("Extract typed values from messy text or receipts") and immediately positions itself against the sibling chat tool. An agent can distinguish it from every sibling without opening a 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?

"Prefer this over chat when you need structured fields with confidence scores and explicit nulls (p_null) instead of made-up answers" names the alternative and the selecting condition. It lacks an explicit when-not clause (e.g., use chat for open-ended answers), so it stops short of the top tier.

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