Skip to main content
Glama

extract

Pull named fields out of messy text and get them back as structured JSON.

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>"
    },
    "name": "extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to extract from (max 6000 characters)
fieldsNoComma-separated field names, e.g. invoice_no,total,currency,due_date

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Comma-separated field names, e.g. invoice_no,total,currency,due_date",
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Text to extract from (max 6000 characters)",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "text"
      +]
  4. Added

TDQS

B3.2/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden. It discloses only that output is structured JSON; it says nothing about what happens when a named field is absent, whether extraction is deterministic/LLM-driven, error behavior, or cost/latency traits an agent needs for a text-processing call.

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?

A single front-loaded sentence with no wasted words; the core action and the output shape come first. It is tight, though its brevity contributes to the uncovered behavioral and parameter questions rather than resolving them.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only two parameters and no output schema, the description should at least sketch the return structure beyond 'structured JSON' and explain the optional fields behavior. It conveys the essence of a simple tool but leaves real gaps for correct invocation.

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 coverage is 100%, so both parameters are documented in the schema, establishing a baseline of 3. The description adds only the concept of 'named fields' and does not clarify the key ambiguity: what is returned when the optional 'fields' parameter is omitted (all fields vs. inferred fields).

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 gives a specific verb ('Pull') plus resource ('named fields out of messy text') and states the output form ('structured JSON'). It is distinguishable from most siblings such as regex_test or json_path, though it never names an alternative to reinforce that distinction.

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?

The phrase 'messy text' implicitly scopes when to use it (unstructured input needing field extraction), but there are no explicit when-not conditions and no routing to related tools like regex_test, json_path, ocr, or scrape that an agent might otherwise pick.

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