Skip to main content
Glama

Buscar por referencia

buscar_por_codigo
Read-onlyIdempotent

Busca bienes por un identificador: referencia catastral, IDUFIR / CRU, referencia registral, id de subasta del BOE (SUB-…), id de la Seguridad Social o la AEAT, anuncio del BOE, bastidor o matrícula. Devuelve en qué campo coincide (con su valor solo si es exactamente el buscado o la ficha ya está consultada) y la ficha reducida de cada bien en ficha, como buscar_bienes; el detalle, con ver_bien. No consume cuota. Sin cuenta solo devuelve finalizadas y dice cuántas activas hay.

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": {
      "q": "<q>"
    },
    "name": "buscar_por_codigo"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesEl identificador; espacios, guiones y barras dan igual.

Output Schema

NameRequiredDescriptionDefault
qNo
idsNo
errorNoCódigo de error del API, si la llamada falla.
totalNo
activasNo
messageNo
_limitesNoCupos y rate limit restantes tras la llamada.
resultadosNo
consultadasNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / resultados / items / properties / ficha
      Added value: +{
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / resultados / items / properties / valor / description
      Added value: +"El valor del campo que coincide: solo si es exactamente el buscado o la ficha ya está consultada."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive and closed-world, yet the description adds substantial context beyond them: no quota consumption, the anonymous-user restriction to finalized items with a count of active ones, and the rule that the matched field's value is only returned when the match is exact or the record is already consulted.

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?

Three sentences, front-loaded with the purpose and identifier list, then return shape, then cost and anonymous-limits caveats. Every clause carries decision-relevant information; nothing is repeated from the title or schema.

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?

Even though an output schema exists (so return values need not be spelled out), the description still explains what comes back and how to get more detail. Quota behavior, anonymous-user limits and sibling routing are all covered for a one-parameter tool, leaving no material gap.

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% and the single parameter already documents that spaces, hyphens and slashes are ignored, so the baseline is 3. The description earns above baseline by enumerating the accepted identifier families, which tells the agent what kinds of values to put in q — information the schema does not carry.

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 specific verb and resource ("Busca bienes por un identificador") and then enumerates the exact identifier types accepted (referencia catastral, IDUFIR/CRU, referencia registral, SUB-…, Seguridad Social/AEAT, bastidor, matrícula). It also distinguishes itself from siblings by naming buscar_bienes for the reduced record and ver_bien for full detail.

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

Usage Guidelines4/5

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

Implicitly sets the condition for use — you have an identifier rather than filter criteria — and routes to ver_bien for detail. It adds practical conditions ("No consume cuota", anonymous users only get finalizadas plus a count of activas), but never explicitly says when to prefer buscar_bienes over this tool, so the exclusion is left to inference.

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.