Skip to main content
Glama

ai_extract

Read-only

AI structured extract — Extract named fields from text into a JSON object via Workers AI; null for missing fields. Price: $0.008 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": {
      "text": "<text>",
      "fields": "<fields>"
    },
    "name": "ai_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYessource text
fieldsYescomma-separated field names (e.g. name,email,phone)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely new behavioral facts: missing fields come back as null, and each call costs $0.008 USDC on Base via x402 — a payment requirement an agent must know 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short clauses: the capability first, then output semantics, then price. Every sentence carries information an agent needs and nothing is padded.

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 two-parameter tool with no output schema, the description covers what the output is (a JSON object), how gaps are represented (null), and the payment cost. The only residual gap is the exact key shape of the returned object, which is a minor omission.

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%, with both 'text' (source text) and 'fields' (comma-separated field names, with an example) documented. The description restates that named fields are extracted but adds no format or syntax detail beyond the schema, so baseline 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 result: 'Extract named fields from text into a JSON object.' That is clearly distinguishable from text-transformation siblings such as ai_translate or ai_sentiment, though no sibling is named explicitly.

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?

Usage is implied by 'extract named fields from text' — an agent can infer the scenario, but there is no explicit when-to-use versus alternatives (e.g. ai_classify for labels, ai_chat for free-form) and no stated preconditions beyond the price.

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