Skip to main content
Glama
Auditor DIAN

Auditor DIAN

by RafaGM1108

Facturas repetidas y anuladas

duplicados_y_anulaciones
Read-only

Detects duplicate invoices from the same supplier with different CUFE and identifies invoices fully or partially annulled by credit notes to prevent double-counted purchases before period close.

Instructions

Facturas del mismo proveedor y número con distinto CUFE (posibles duplicados) y facturas anuladas total o parcialmente por notas crédito (tolerancia de 2 pesos).

Úsela cuando el usuario pregunte, por ejemplo:

  • "¿Hay facturas repetidas?"

  • "¿Qué facturas me anularon con nota crédito?"

  • Antes de cerrar un periodo, para revisar que no se cuente dos veces una compra.

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>",
      "desde": "<desde>",
      "hasta": "<hasta>"
    },
    "name": "duplicados_y_anulaciones"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior — how duplicates are detected (supplier + number, differing CUFE) and that annulment matching carries a 2-peso tolerance. It says nothing about result volume, ordering, or pagination for what could be a long exception list.

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?

Front-loads the definition before the usage examples, and each sentence carries information. The three bullets are short and illustrative rather than padding, though the third is more situational than the first two.

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 three-parameter read-only query with no output schema, the definition covers what is detected, the matching rules, and when to reach for it. The main residual gap is that the shape of the returned findings (fields per duplicate group or annulled invoice) is left implicit.

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%, and the schema itself already spells out date formats, inclusive ranges, bimonthly mapping and the NIT/C.C. formatting rules plus the pointer to listar_clientes. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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 precisely what the tool returns: invoices from the same supplier with the same number but a different CUFE (possible duplicates), plus invoices annulled totally or partially by credit notes. The matching rule and the tolerance threshold are given, so an agent knows exactly what class of finding this produces without opening the schema.

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 explicit trigger conditions with concrete user phrasings ("¿Hay facturas repetidas?", "¿Qué facturas me anularon con nota crédito?") and a proactive scenario (before closing a period, to avoid double-counting a purchase). It does not name a sibling tool to route away to or state when not to use it, which keeps it short of a 5.

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