Skip to main content
Glama
Normativa Colombia MCP

Normativa Colombia MCP

Obtener el texto de un documento por fuente

obtener_documento

Fetches paginated text from eight Colombian legal sources, applies source-specific parameters, supports keyword filtering, and can save full documents to disk.

Instructions

Devuelve el texto (troceado, nunca entero) de una de las ocho fuentes con texto. CADA FUENTE EXIGE LO SUYO y los parámetros de otra no valen con ella: gestor necesita id; suin, id; corte, ruta; suprema, ruta y sala; consejo, token; dian, link; creg, ruta; sectorial, entidad y url. Una combinación que no encaje se rechaza antes de salir a la red, diciendo qué falta y el ejemplo mínimo que funciona. Qué parte sale: historial (gestor) da los cambios anotados en vez del texto, del artículo si va con articulo; articulo (gestor y suin) o seccion (cortes) acotan y entonces buscar_en_texto no se aplica; desde solo avanza el troceo, no los pasajes de buscar_en_texto. Informa total/mostrado/omitido y el "desde" del trozo siguiente. ESCRIBE EN DISCO solo con entero o ruta_destino, que se imponen a todo lo anterior: dian y sectorial guardan el archivo original; las demás, texto-.txt (sin ruta_destino, en una carpeta temporal); consejo no lo admite. Nunca sobrescribe: un nombre repetido lleva sufijo. Para encontrar el documento usa antes resolver_cita o el buscador de su fuente.

Input Schema

NameRequiredDescriptionDefault
idNoSolo gestor y suin: id numérico de la norma
urlNoSolo sectorial: enlace del acto a leer, tal como lo devuelve buscar_normativa_sectorial
linkNoSolo dian: nombre del archivo, ej. "decreto_1625_2016.htm"
rutaNocorte/suprema/creg: ruta del documento
salaNoSolo suprema: la MISMA sala con la que se encontró
desdeNo
tokenNoSolo consejo: token que devuelve buscar_jurisprudencia_consejo_estado
enteroNoEn vez de trocear, escribe el documento a disco y devuelve la ruta con un trozo del texto
fuenteYesDe qué fuente sale el documento
entidadNoSolo sectorial: id del regulador (los lista buscar_normativa_sectorial)
seccionNoSolo corte, suprema y consejo: devuelve solo esa parte de la providencia. "consideraciones" es la motivación de la MAYORÍA; "salvamentos" y "aclaraciones" son los votos particulares, que NO son doctrina de la Sala.
articuloNoSolo gestor y suin: número de artículo
historialNoSolo gestor: en vez del texto, devuelve los cambios anotados sobre la norma
sin_temasNoSolo gestor: omite el bloque de temas asociados (ahorra contexto cuando solo se quiere el articulado)
max_pasajesNoMáximo de pasajes con buscar_en_texto (por defecto 10)
ruta_destinoNoCarpeta donde guardar el archivo (con entero o para descargar el PDF/Word sin devolver texto)
buscar_en_textoNoDevuelve solo los fragmentos que mencionan este término
limite_caracteresNoTope del TEXTO devuelto; se ajusta al rango 200–40.000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.16.1
    • changedInput schema / properties / articulo / description
      Previous value: -"Solo gestor: número de artículo"New value: +"Solo gestor y suin: número de artículo"
    • changedInput schema / properties / fuente / enum
      Previous value: -[
      -  "gestor",
      -  "corte",
      -  "suprema",
      -  "consejo",
      -  "dian",
      -  "creg",
      -  "sectorial"
      -]New value: +[
      +  "gestor",
      +  "suin",
      +  "corte",
      +  "suprema",
      +  "consejo",
      +  "dian",
      +  "creg",
      +  "sectorial"
      +]
    • changedInput schema / properties / id / description
      Previous value: -"Solo gestor: id numérico de la norma"New value: +"Solo gestor y suin: id numérico de la norma"
  2. Changed2 schema fields changedv1.14.0
    • changedInput schema / properties / seccion / description
      Previous value: -"Solo corte: devuelve solo esa parte de la providencia"New value: +"Solo corte, suprema y consejo: devuelve solo esa parte de la providencia. \"consideraciones\" es la motivación de la MAYORÍA; \"salvamentos\" y \"aclaraciones\" son los votos particulares, que NO son doctrina de la Sala."
    • changedInput schema / properties / seccion / enum
      Previous value: -[
      -  "antecedentes",
      -  "consideraciones",
      -  "decision"
      -]New value: +[
      +  "encabezado",
      +  "antecedentes",
      +  "consideraciones",
      +  "decision",
      +  "salvamentos",
      +  "aclaraciones",
      +  "notas"
      +]
  3. Changed1 schema field changedv1.13.0
    • addedInput schema / properties / sin_temas
      Added value: +{
      +  "description": "Solo gestor: omite el bloque de temas asociados (ahorra contexto cuando solo se quiere el articulado)",
      +  "type": "boolean"
      +}
  4. Addedv1.11.2

TDQS

A4.5/5.0
Behavior5/5

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

Despite annotations covering openWorld and non-readOnly, the description adds substantial behavioral context: exactly which conditions cause a disk write ('entero o ruta_destino'), the no-overwrite/suffix rule, that invalid combos are rejected before hitting the network with a message saying what's missing, and the total/mostrado/omitido reporting. This explains and enriches the readOnlyHint=false annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core behavior, but packs everything into one dense, capitalized run-on paragraph rather than scannable structure. Size is justifiable for an 18-parameter, 8-source tool, yet the telegraphic style and caps make it harder to parse than necessary.

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?

For a complex 18-param tool with no output schema, the description is remarkably complete: it explains return shape (total/mostrado/omitido and next 'desde'), interaction with buscar_en_texto, section semantics, and disk-write side effects. Nothing an agent needs 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.

Parameters4/5

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

Schema coverage is already 94%, so per-parameter text is not strictly needed, but the description adds cross-parameter meaning the schema cannot: the source-to-required-parameter matrix (gestor→id, corte→ruta, consejo→token, sectorial→entidad+url), plus how historial, articulo/seccion, and desde interact. This exceeds the baseline-3 for high-coverage schemas.

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 (devuelve) and resource (el texto de un documento) scoped to fuente, and makes the chunking contract explicit ('troceado, nunca entero'). It distinguishes itself from the many buscar_* siblings by framing itself as the retrieval step after discovery and naming resolver_cita as the prerequisite.

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 actionable routing guidance ('Para encontrar el documento usa antes resolver_cita o el buscador de su fuente') and spells out acceptance/rejection behavior for mismatched fuente+parameter combos. It covers when to use it well, though it doesn't explicitly enumerate when another sibling (e.g. buscar_en_texto) should be preferred instead.

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