Skip to main content
Glama

Buscar un valor en una tabla

lookup-table
Read-onlyIdempotent

Busca una clave en una tabla (objeto o lista de pares clave/valor) y devuelve su valor o un valor por defecto, con coincidencia opcional sin mayúsculas ni tildes. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: leer el valor en una ruta como /clientes/0/nit dentro de un documento JSON con la sintaxis RFC 6901 (json-pointer-get). 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: Maps a key to a value through a lookup table (object or list of key/value pairs) with an optional default, case- and accent-insensitive matching and trimming; reports whether the key was found and which table key matched. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. [EN completo / full EN: inputSchema.description]

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "key": "bogota",
      "match": "case_accents",
      "table": {
        "Bogotá": "11001",
        "Medellín": "05001"
      }
    },
    "name": "lookup-table"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesKey to look up (string, number, boolean or null; compared as text) (string or number or boolean or null; required; up to 1000 chars).
trimNoTrim surrounding whitespace before comparing (boolean; optional; default true).
matchNoexact, case-insensitive, or case- and accent-insensitive (optional; one of: exact, case, case_accents; default "exact").exact
pairsNoAlternative to table: list of {key, value} (keeps order, allows any key text) (array of object; optional).
tableNoLookup table: object of key -> value (object; optional).
defaultNoValue when the key is not found (default null) (any JSON value; optional).

Output Schema

NameRequiredDescriptionDefault
foundNo
valueNoany JSON value
matched_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "key": "bogota",
      +    "match": "case_accents",
      +    "table": {
      +      "Bogotá": "11001",
      +      "Medellín": "05001"
      +    }
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / key / examples
      Added value: +[
      +  "bogota"
      +]
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, and the description's 'sin red, sin estado guardado' largely restates that. What it genuinely adds beyond annotations is operational: hard limits (64 KB input, 1 s per call, 1 MB result) and the fact that the response reports found/not-found plus which table key matched. It does not cover behavior when both 'table' and 'pairs' are supplied, which is the one remaining behavioral unknown.

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 Spanish block is tightly labeled (Cuándo / No para / Efectos / Determinista / Límites), so the key routing information is front-loaded and scannable. It loses a point for the duplicated English rendering plus the meta tag '[EN completo / full EN: inputSchema.description]', which is boilerplate rather than tool information.

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 6-parameter, nested-object tool with an output schema and full annotations, the description covers purpose, routing, safety profile and limits, so an agent has enough to call it correctly. The gap is the unresolved relationship between the mutually substitutable 'table' and 'pairs' inputs (what happens if both are passed), which the description never addresses.

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% and an output schema exists, so the schema carries parameter documentation; baseline is 3. The description adds only marginal meaning beyond it — that matching can ignore case and accents and that surrounding whitespace is trimmed — which the schema already explains via 'match' and 'trim'. It does not clarify the table-vs-pairs precedence that the schema leaves implicit.

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 concrete verb+resource: it looks up a key in a table (object or list of key/value pairs) and returns its value or a default, with optional case- and accent-insensitive matching. It also explicitly names what it is not (json-pointer-get for RFC 6901 path reads), so an agent can separate it from the closest sibling without opening any schema.

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?

Has an explicit 'Cuándo' clause (transform/compare/check structured data: JSON, CSV, YAML, XML, arrays) and an explicit 'No para' clause naming the alternative json-pointer-get and its RFC 6901 path syntax. The when/when-not/alternative triple is fully present.

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