Skip to main content
Glama

Leyendo el texto completo

texto_completo

Retrieves the full plain text of a Peruvian legal norm or court decision from SPIJ by ID, with offset pagination or reading the final characters.

Instructions

Devuelve el TEXTO COMPLETO de una norma o jurisprudencia del SPIJ.

Ruta robusta: obtiene el documento word del SPIJ (ruta que incluye el acervo completo de jurisprudencia) y devuelve texto plano. Si esa ruta falla, usa el texto del detalle.

Args: id: identificador del SPIJ, ej 'H1352213' (lo dan buscar_*). offset: desde que caracter del texto empezar (0 = inicio). max_chars: maximo de caracteres a devolver en esta llamada (0 = usa el limite por defecto). Si hay mas texto, 'siguiente_offset' indica por donde continuar. desde_final: si es True, devuelve los ULTIMOS max_chars caracteres (en sentencias judiciales la decision 'RESUELVE' esta al final; combinado con max_chars=3000 la lees directo).

Devuelve: ok, id, url_web, codigoNorma, fechaPublicacion, dispositivoLegal, texto (texto plano), total_caracteres, texto_truncado, siguiente_offset (si hay mas; None con desde_final).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
offsetNo
max_charsNo
desde_finalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.3/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 does substantial work: it discloses the two-path retrieval (primary word-document route, fallback to detail text), the pagination model (total_caracteres, texto_truncado, siguiente_offset), and the desde_final shortcut. It does not state permissions, rate limits, or cost, but read-only behavior is clearly implied by 'Devuelve'.

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-loaded with the purpose, then organized into clear 'Args' and 'Devuelve' sections. Some prose is chatty in Spanish, but every line conveys operative information (fallback logic, truncation, the RESUELVE hint) rather than filler.

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?

There is no output schema, so the description must explain return values, and it enumerates them precisely (ok, id, url_web, codigoNorma, fechaPublicacion, dispositivoLegal, texto, total_caracteres, texto_truncado, siguiente_offset). For a paginated full-text retrieval tool this is complete enough for an agent to call it correctly.

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 fully and it does: 'id' includes the format example 'H1352213' and its source; 'offset' is defined as the starting character; 'max_chars' explains the 0=default sentinel; 'desde_final' is fully explained with a motivating example. Every parameter is documented beyond the bare schema types.

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: 'Devuelve el TEXTO COMPLETO de una norma o jurisprudencia del SPIJ'. It also discloses the retrieval strategy (SPIJ word document with fallback to detail text), which distinguishes it from metadata-oriented siblings like detalle_norma and estructura_norma.

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?

Gives useful operational context: 'id... lo dan buscar_*' and a concrete use case for desde_final ('en sentencias judiciales la decision RESUELVE esta al final; combinado con max_chars=3000 la lees directo'). However it never states when to choose this tool over siblings such as detalle_norma, estructura_norma, or buscar_en_norma, leaving the routing to inference.

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