Skip to main content
Glama

doctrina_ingestar_documento

Convert PDF, DOCX, TXT, MD or raw text into canonical legal Markdown and incrementally index only that document in the doctrine SQLite FTS5 store and knowledge graph without rebuilding.

Instructions

Convierte documentos (PDF, DOCX, TXT, MD) o textos a Markdown canónico de alta densidad dogmática (normas RAE/ASALE y citas chilenas BCN/CS) y agrega de forma incremental solo ese documento al índice SQLite FTS5 de doctrina y al Knowledge Graph (legal_knowledge_graph.json), sin reconstruirlos: tarda segundos.

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": {
      "file_path": "<file_path>"
    },
    "name": "doctrina_ingestar_documento"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoÁrea del derecho (ej. 'civil', 'procesal', 'laboral', 'penal', 'constitucional', 'administrativo'). Por defecto 'civil'.civil
obraNoTítulo de la obra, tratado o manual jurídico.
materiaNoMateria dogmática específica tratada en el documento.
file_pathYesRuta al archivo (.pdf, .docx, .txt, .md) o texto crudo a procesar.
tratadistaNoNombre del autor o tratadista (ej. 'René Ramos Pazos', 'Enrique Barros Bourie').
target_pathNoRuta de destino personalizada para el archivo .md generado (opcional).
actualizar_grafoNoSi es True, agrega de inmediato los nodos del documento al Knowledge Graph de LegalGraphify (legal_knowledge_graph.json), sin reconstruirlo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.14.0
    • changedInput schema / properties / actualizar_grafo / description
      Previous value: -"Si es True, asimila y reconstruye de inmediato el Knowledge Graph de LegalGraphify (legal_knowledge_graph.json)."New value: +"Si es True, agrega de inmediato los nodos del documento al Knowledge Graph de LegalGraphify (legal_knowledge_graph.json), sin reconstruirlo."
  2. Addedv1.5.11

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false with destructiveHint=false, so the agent knows it mutates state safely. The description adds genuinely useful behavior beyond that: it writes two artifacts (FTS5 index and legal_knowledge_graph.json), appends rather than rebuilds them, and runs in seconds. It stays silent on overwrite behavior for an existing target_path, idempotency on re-ingest, and error handling, which leaves real gaps for a mutating tool.

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 front-loaded sentence leads with the conversion purpose before the indexing side effect, and the closing 'sin reconstruirlos: tarda segundos' earns its place as a performance guarantee. The parentheticals about RAE/ASALE and BCN/CS citation rules are dense but relevant; the sentence is long yet contains no filler.

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 a 7-parameter mutation tool with no output schema, the definition should say what a successful call returns or produces (e.g., the generated .md path and confirmation of index/graph updates). It covers the two side effects and the speed profile but omits return value, failure modes, and the relationship between target_path and the index entries, leaving the agent to guess at outcomes.

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 description coverage is 100%, so every parameter already carries its own documentation and the baseline of 3 applies. The description reinforces file_path by naming accepted formats and hints at target_path as the generated .md destination, but adds little else about how area, obra, tratadista, or materia feed the graph or index.

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 specific verbs and resources: converts PDF/DOCX/TXT/MD or raw text to canonical Markdown and incrementally appends only that document to the SQLite FTS5 index and the knowledge graph. The scope is unmistakable, but the description never contrasts itself with siblings such as critique_documento or doctrina_search, so an agent must infer that this is the ingestion/onboarding path.

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?

Usage is only implied: the wording about adding 'solo ese documento' incrementally and taking seconds suggests this is the tool for ingesting a new doctrine source rather than rebuilding. There is no explicit when-to-use statement, no prerequisite (e.g., conversion must precede search), and no exclusion of alternatives like critique_documento.

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