Skip to main content
Glama

extract_numbers

Extract numbers, dates and symbols from text using a combined LLM and regex pass, so formatting differences are caught and extraction still works if the model fails.

Instructions

Read the numbers, dates and symbols out of a text with the extraction agent.

The model's reading is combined with the deterministic regex pass, so a mention the model formats differently ("eleven" beside "11") is still found, and a model that cannot answer at all degrades to the regex reading instead of failing. sources says which strategies contributed. Needs an LLM endpoint (OPENAI_API_KEY or OPENAI_BASE_URL).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
numbersNo
sourcesNo
symbolsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 behavioral burden and does so well: it discloses the model+regex combination, the graceful degradation to regex on model failure, that ``sources`` reports which strategies contributed, and the LLM-endpoint prerequisite. It stops short of return format/pagination details, but the failure and dependency behavior is unusually well covered.

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?

Front-loads the purpose, then elaborates on the combination/degradation behavior and the endpoint requirement. Every sentence carries information, though the degradation explanation is slightly verbose.

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 single-parameter extraction tool with an output schema present, the description covers purpose, behavioral failure modes, and the environment prerequisite. The main gap is the lack of when-to-use guidance relative to siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single required `text` parameter. The description implies text is the input source but adds no format, constraints, or examples for it, and its only structured detail (``sources``) concerns output, so it does not compensate for the coverage gap.

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?

States a specific verb and resource: read numbers, dates and symbols out of text, via an extraction agent. Clear enough that an agent knows the tool's job, but it never contrasts itself with siblings like find_patterns or compute_numerology, so sibling differentiation is absent.

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 description gives a usage condition (needs an LLM endpoint via OPENAI_API_KEY/OPENAI_BASE_URL) but offers no explicit when-to-use/when-not and no routing to or away from alternatives among the sibling tools. Usage is only implied by the extraction framing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.