Skip to main content
Glama

buscar_en_norma

Find a word or phrase inside a SPIJ legal norm's full text, ignoring accents and case, and return each occurrence with offsets to jump to specific sections.

Instructions

Busca una palabra o frase DENTRO del texto completo de una norma del SPIJ, y devuelve cada ocurrencia con su offset (para leer alrededor con texto_completo(id, offset=X, max_chars=N)). Ideal para saltar a secciones concretas (ej 'RATIFICAN', 'Artículo 8', 'DISPOSICIONES FINALES') sin leer todo el texto. La busqueda ignora acentos y mayusculas.

Args: id: identificador del SPIJ, ej 'H1385488'. texto: palabra o frase a buscar dentro de la norma (1-8 palabras). contexto: caracteres de contexto alrededor de cada ocurrencia (50-500, default 200). max_matches: maximo de ocurrencias a devolver (1-25, default 10).

Devuelve: ok, id, url_web, total_caracteres, matches: lista de {offset, extracto}, hay_mas (si quedan ocurrencias).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
textoYes
contextoNo
max_matchesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.6/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 burden and discloses useful behavior: search ignores accents and capitalization, returns offsets and extracts, enforces context and match limits, and indicates hay_mas when more occurrences remain. It does not mention authentication, rate limits, or error behavior, but those are less critical for this read-only search tool.

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?

Front-loads the core behavior before the argument and return details, and the Args/Devuelve structure makes scanning easy. The examples and range details earn their place by removing ambiguity.

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?

Covers what the tool does, all parameters, and the return shape even though there is no output schema. It also supplies the offset-to-texto_completo workflow, which is the key operational context for using the results.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: it documents all four parameters with meaning, examples, and constraints, including id format, texto length, contexto range and default, and max_matches range and default.

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: searching a word or phrase inside the full text of a specific SPIJ norm. It also distinguishes itself from reading the whole text by explaining the offset-based occurrence result and referencing texto_completo for surrounding context.

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?

Makes the intended use clear: ideal for jumping to specific sections without reading all text. It names texto_completo as the follow-up tool for reading around a match, but it does not explicitly say when to prefer buscar_normas or other siblings instead.

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