Skip to main content
Glama
Auditor DIAN

Auditor DIAN

by RafaGM1108

Exportar informe a Excel

exportar_informe

Exports a client's DIAN invoice report for a date range to a new Excel file with summary and CUFE detail sheets, avoiding overwrites and returning the saved path.

Instructions

Guarda un informe del periodo en un Excel nuevo, con una hoja de resumen y otra de detalle con los CUFE.

Úsela cuando el usuario pida, por ejemplo:

  • "Exporta las retenciones del primer semestre a Excel"

  • "Pásame a un Excel las compras por proveedor de 2025, en el escritorio"

Nunca sobrescribe: si el archivo ya existe, proponga otro nombre. Devuelve dónde quedó.

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": {
      "cliente": "<cliente>",
      "informe": "<informe>",
      "desde": "<desde>",
      "hasta": "<hasta>",
      "ruta": "<ruta>"
    },
    "name": "exportar_informe"
  }
}

Input Schema

NameRequiredDescriptionDefault
rutaYesDónde guardarlo, como lo diga el usuario: una carpeta ('Escritorio', y el nombre se pone solo), 'Escritorio/retenciones' o solo un nombre de archivo (queda en la carpeta personal). Se agrega .xlsx si falta.
desdeYesPrimer día del periodo, AAAA-MM-DD, incluido. Se filtra por fecha de emisión. Bimestre 1 = enero y febrero; 'el año pasado' = 1 de enero a 31 de diciembre.
hastaYesÚltimo día del periodo, AAAA-MM-DD, incluido.
clienteYesNIT o cédula del cliente, tal como lo escriba el usuario: con puntos, espacios, guion, 'NIT' o 'C.C.', con o sin dígito de verificación. Si lo nombra por su razón social, búsquelo antes con listar_clientes.
informeYescompras_por_proveedor, iva_compras_por_bimestre, retenciones, duplicados_y_anulaciones, facturas_credito o no_validadas (sin validación DIAN).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the description's job is to add nuance — and it does: "Nunca sobrescribe: si el archivo ya existe, proponga otro nombre" clarifies the write is non-clobbering and prescribes conflict handling, and "Devuelve dónde quedó" discloses the return contract. It does not cover permissions, whether the directory must pre-exist, or large-report behavior, which keeps it below a 5.

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?

The first sentence front-loads what is produced, followed by trigger examples and then the two behavioral caveats — a logical order with no filler. The example block is longer than strictly necessary but earns its place as intent-matching material.

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?

For a 5-required-parameter write tool with no output schema, the definition covers purpose, triggers, overwrite policy and the fact that a location is returned, which is enough for correct invocation. A slightly fuller return description (path string vs. structured payload) would close the remaining gap.

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 the baseline is 3; the prose itself adds no parameter guidance beyond the schema (though the schema is notably rich, covering date semantics and the cliente lookup fallback to listar_clientes). The description body repeats none of that, so the schema is doing all the work.

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?

"Guarda un informe del periodo en un Excel nuevo" gives a specific verb (guarda/exporta) and resource (informe) plus the output artifact, and it goes further by stating the internal structure (una hoja de resumen y otra de detalle con los CUFE). An agent can tell this apart from reporting siblings like resumen_periodo or duplicados_y_anulaciones because the deliverable is a file, not a rendered summary.

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?

The "Úsela cuando el usuario pida, por ejemplo" block with two realistic utterances makes the trigger condition concrete and easy to pattern-match against user intent. It stops short of explicit exclusions (e.g., "si solo quiere ver el resumen, use resumen_periodo"), so the agent must infer when not to export.

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