Skip to main content
Glama

Extraer números

extract-numbers
Read-onlyIdempotent

Extrae números de un texto, entendiendo separadores de miles y decimales en estilo en (1,234.5) o es (1.234,5). Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: leer un número escrito en palabras o cifras en español (es-number-parse). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Finds numbers in text, handling signs, decimals, exponents and thousands separators in en (1,234.5) or es/co (1.234,5) style, and returns them as numbers. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: reading a number written in Spanish words or digits (es-number-parse). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.

Input Schema

NameRequiredDescriptionDefault
textYesText (string; required).
styleNoSeparator convention (optional; one of: en, es; default "en").en

Output Schema

NameRequiredDescriptionDefault
countNo
numbersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "Paid $1,234.50 on 3 items, -2.5e3 delta"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Despite annotations already declaring read-only, no-network, idempotent, and non-destructive behavior, the description adds concrete operational traits: deterministic output, no stored state, 64 KB input limit, 1 s per call, and 1 MB result limit. These are valuable constraints not present in the annotations.

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?

The content is front-loaded and organized with clear labels such as Cuándo, No para, Efectos secundarios, Determinista, and Límites. It is somewhat longer than necessary because the Spanish and English versions duplicate the same information.

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?

Given an output schema, two simple parameters, and rich annotations, the description covers purpose, usage boundaries, side effects, determinism, and limits. An agent has everything needed to decide when and how to call it.

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 100%, so the baseline is 3, but the description adds useful meaning by explaining en and es/co separator conventions and mentioning signs, decimals, and exponents that the schema does not document. It does not add deep per-parameter guidance, but it enriches interpretation of the text input.

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?

The description states a specific verb and resource: extracting numbers from text while handling signs, decimals, exponents, and thousands separators. It explicitly distinguishes itself from the sibling es-number-parse by saying it is not for reading numbers written in Spanish words or digits.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use guidance tied to exact transformation, comparison, or measurement, and explicitly names the alternative tool es-number-parse for the excluded case. The boundary between this tool and the sibling is clear enough for an agent to choose correctly.

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