Skip to main content
Glama

Listando arboles del tesaurio

listar_tesauro

Browse the Peruvian Constitutional Court thesaurus by listing root concepts or child subtrees for sentencias, autos, or interlocutorias using parent ID and depth.

Instructions

Arbol de conceptos del TESAURO del TC NAVEGABLE (el arbol completo puede exceder el limite de contexto del cliente: NUNCA se entrega de un bote; se navega). SIN parent_id devuelve las RAICES (nivel 1) con su 'count_subarbol' (acumulado de todo el subarbol). Con parent_id devuelve el SUBARBUS del nodo hasta 'depth' niveles.

Args: tipo: 'sentencias' (default), 'autos' o 'interlocutorias'. parent_id: id del nodo padre (de una respuesta previa); omitido/'' = raices del arbol. depth: niveles de children a incluir bajo el parent (1..4; default 1; cap local a 4).

Devuelve: {'ok', 'tipo', 'parent_id', 'depth', 'nodos': [{id, nombre, slug, code, count_subarbol, children? (si depth>1)}], 'ms', 'nota'?}: cada nodo trae 'count_subarbol' (el TOTAL ACUMULADO del subarbol, publicado por el TC) y 'nota' cuando el nodo no existe o no tiene children. IMPORTANTISIMO: los 'count_subarbol' del arbol NO son el 'total' de resultados_tesauro (que cuenta solo asignaciones DIRECTAS al nodo): el acumulado suma todo el subarbol. El 'code' del TC puede NO cuadrar con la posicion del nodo (dato upstream inconsistente, ej nodo 458 con code 6.6.7 colgando de la rama 1.1.2): NAVEGA por 'id', nunca reconstruyas la ruta por 'code'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tipoNosentencias
depthNo
parent_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.7/5.0
Behavior5/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 so richly: it warns about context-limit navigation, explains that count_subarbol is an accumulated subtree total distinct from resultados_tesauro's direct count, and flags upstream 'code' inconsistency with an explicit instruction to navigate by 'id'. It also mentions the 'nota' field emitted when a node has no children.

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 core navigable-tree concept, then Args and Devuelve sections. Every sentence earns its place given the complexity, but the formatting is chatty and somewhat verbose for an agent-facing definition.

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?

Although an output schema exists, the description still clarifies the return shape and the non-obvious count semantics and code-vs-id trap. For a navigation tool with subtle footguns, nothing an agent needs in order to call it correctly is missing.

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 fully does: it documents each of the three params (tipo values 'sentencias'/'autos'/'interlocutorias', parent_id as prior-node id or null for roots, depth range 1..4 with default 1 and a local cap). This adds authoritative syntax and defaults beyond the bare schema.

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+resource: it navigates/lists the concept tree ('Arbol de conceptos del TESAURO del TC NAVEGABLE'), and clarifies the two modes (roots without parent_id vs subtree with it). It even distinguishes itself from the sibling resultados_tesauro by contrasting their count semantics, so an agent can tell the two apart without opening schemas.

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?

Gives clear usage context: must be navigated rather than fetched whole ('NUNCA se entrega de un bote'), omit parent_id for roots, pass a parent_id from a prior response for subtrees, and use depth for levels. It does not enumerate explicit when-not-to-use conditions or name the alternative tools by name, which keeps it short of a 5.

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