Skip to main content
Glama

generar_documento

Generate complete legal documents as editable Word, HTML, MD, TXT, or JSON for civil, labor, protection, PPA contracts, or extended reports with cited statutes and case law.

Instructions

Genera un documento de trabajo completo y lo entrega en Word (.docx editable, hoja A4, texto justificado) más HTML/MD/TXT/JSON. Tipos: demanda civil, recurso de protección, demanda laboral, contrato PPA, o «informe» — el informe en derecho EXTENSO: describe los hechos del caso, desarrolla el análisis jurídico y transcribe ÍNTEGRO el artículo de cada norma citada (con su cita y enlace); la doctrina y la jurisprudencia se buscan solas en el material local (sentencias TA, biblioteca ambiental, fallos rectores CS/TC) cuando no se las entregan. Regla del producto: no se cita sin texto.

Input Schema

NameRequiredDescriptionDefault
rutNo
casoNoInforme: identificación del caso
tipoYes
hechosYesLos hechos del caso — narración extensa (fechas, conductas, circunstancias, perjuicios)
normasNoInforme: normas a transcribir («Código Civil art. 1545»); las mencionadas en los textos se detectan solas
objetoNoInforme: la cuestión jurídica planteada (obligatoria)
derechoNo
materiaNoInforme: materia (laboral, civil, ambiental…)
analisisNoInforme: el análisis jurídico extenso (subsunción de los hechos en las normas, contraargumentos) — es el cuerpo del informe
dictamenNoInforme: la conclusión (si se omite se usa 'peticiones')
doctrinaNoInforme: doctrina ya reunida ({obra, autor, institucion, texto}); si se omite se busca en el corpus canónico
otrosiesNo
tribunalNo
demandadoNo
demandanteNo
peticionesNo
comparecenciaNo
jurisprudenciaNoInforme: fallos o dictámenes ({cita, texto})

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare it is a non-read-only, closed-world, non-destructive write. The description adds real behavioral context beyond that: multi-format delivery, automatic retrieval of doctrine/jurisprudence from the local corpus when not supplied, full-text transcription of each cited norm, and the product rule «no se cita sin texto». It stops short of stating whether existing files are overwritten or where output lands.

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?

A single dense paragraph, front-loaded with what it produces and in which formats before moving to the «informe» special case and the citation rule. Every sentence carries information, though the run-on «informe» clause is heavy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter generator with no output schema, the description covers the output formats and the informe pipeline well, but leaves the civil/laboral/protección/PPA modes' expected inputs and the handling of optional fields unaddressed. Adequate for the flagship mode, incomplete for the rest.

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 50% across 18 parameters. The description meaningfully explains the informe-mode inputs (hechos, análisis, normas, doctrina, jurisprudencia auto-search), which compensates for several undocumented fields, but many parameters (rut, tribunal, demandante, demandado, peticiones, comparecencia, otrosies) and the non-informe modes get no semantic help in the description.

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 (generar) and resource (documento de trabajo) and enumerates the five concrete document types plus the output formats (Word .docx, HTML/MD/TXT/JSON). It also carves out the «informe» mode's distinct behavior, so an agent can tell it apart from the sibling recurso_proteccion_generar and export_brief_ojv.

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?

The type enum and the special «informe» branch imply when each mode applies, but there is no explicit when-to-use/when-not guidance and no mention of the overlapping siblings (recurso_proteccion_generar, compile_legal_dossier, export_brief_ojv). Usage must be inferred from the type list.

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

Deploy Server

Other Tools