Skip to main content
Glama

obtener_documento

Retrieves the full text of Spanish DGT consultations or TEA criteria and resolutions by ID, with optional complete TEA text and pagination for long documents.

Instructions

Texto completo de una consulta de la DGT o de un criterio/resolución de los TEA.

Args: id: número de consulta DGT («V1479-26», «0123-24») o id de DYCTEA tal como lo devuelve buscar_resoluciones_teac («TEAC:00/09428/2023/00/0/1»). texto_completo: solo TEA; True añade el texto íntegro de la resolución (largo). parte: los documentos largos se devuelven por partes de ~12.000 caracteres.

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": {
      "id": "<id>"
    },
    "name": "obtener_documento"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
parteNo
texto_completoNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does useful work: it warns that long documents come back in ~12,000-character chunks and that texto_completo=True yields a very long result. It does not state how many parts exist or what happens for an out-of-range parte, and says nothing about permissions or rate limits.

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?

Purpose sentence is front-loaded and the Args block is scannable and terse. The '(largo)' note about length partly duplicates the ~12.000-character chunking explanation, a small redundancy.

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?

An output schema exists, so return-value description is not required, and the description covers the two document families plus the pagination caveat that an agent needs to iterate correctly. The only real hole is guidance on discovering how many partes exist.

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 0%, so the description does compensate meaningfully: id formats are shown with two concrete examples, texto_completo is scoped to TEA only, and parte is explained as chunking. It still leaves gaps (valid part range, ordering, what parte=1 means by default beyond the schema default), so it lands slightly above baseline rather than fully compensating.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the concrete resource retrieved: full text of a DGT consulta or a TEA criterio/resolución. That resource-level distinction separates it from the buscar_* siblings (search vs. fetch-by-id), although the verb 'obtener/retrieve by id' is only implied, not stated.

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?

Implies the workflow by saying the id is 'tal como lo devuelve buscar_resoluciones_teac', i.e. chain from a search tool first. It never explicitly says when to use this instead of buscar_consultas_dgt or obtener_sentencia, and gives no exclusions.

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