Skip to main content
Glama

Notsy Facturación

preview_factura

DRY-RUN: valida la factura y calcula los totales (subtotal, IVA, retenciones, total) SIN timbrar, reservar ni cobrar. También devuelve la cotización canónica de créditos y el saldo proyectado. Úsalo SIEMPRE antes de emitir_cfdi para confirmar el monto, el costo y que los datos pasen la validación. Aplicar un anticipo cotiza dos CFDI (ingreso + egreso).

Args:
    conceptos: lista de conceptos. Cada uno: {descripcion, clave_prodserv, clave_unidad,
        cantidad, valor_unitario, precio_incluye_iva (bool), tasa_iva (0.16/0.08/0.0),
        objeto_imp ("02"), retencion ("honorarios"|"arrendamiento"|"comisiones"|"fletes"|"")}.
    cliente: datos del receptor {rfc, nombre, regimen_fiscal, cp, uso_cfdi, email,
        es_publico_general} — o usa cliente_id si ya está guardado.
    cliente_id: id de un cliente guardado (alternativa a `cliente`).
    forma_pago: clave SAT de forma de pago (default "03" transferencia).
    metodo_pago: "PUE" (de contado) o "PPD" (a crédito).
    emisor_id: opcional, desde qué RFC emitir (multiemisor); None = predeterminado.
    anticipo_id: opcional, anticipo previo a aplicar; cotiza dos CFDI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clienteNo
conceptosYes
emisor_idNo
cliente_idNo
forma_pagoNo03
anticipo_idNo
metodo_pagoNoPUE

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and excels. It explicitly states the tool does NOT timbrar, reservar, nor cobrar, and promises a projected balance and credit quote. It also discloses that applying an anticipo results in two CFDI quotes, providing behavioral nuance beyond a simple 'preview' label.

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 description is well-structured with a bolded summary head and a clear Args list, but it contains some redundancy: the anticipo multi-CFDI note appears both in the main paragraph and in the anticipo_id argument. Despite this minor repetition, every sentence adds value for a tool of this complexity.

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?

Despite lacking an output schema, the description covers the tool's purpose, usage timing, all parameters, and key outputs (totals, cotización, saldo). It also clarifies an optional pattern (cliente_id vs. cliente). This provides a complete mental model for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

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

Schema description coverage is 0%, but the description's 'Args' section meticulously documents all seven parameters. It specifies the full object structure for conceptos and cliente, valid values for metodo_pago, defaults for forma_pago, and optionality for emisor_id. This fully compensates for the lack of schema-level descriptions.

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?

The description opens with 'DRY-RUN' and clearly states the tool validates the invoice and calculates totals (subtotal, IVA, retenciones, total) without stamping, reserving, or charging. This distinguishes it from the sibling tool emitir_cfdi, and even mentions an edge case (anticipo quotes two CFDI), making the purpose extremely clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs 'Úsalo SIEMPRE antes de emitir_cfdi para confirmar el monto, el costo y que los datos pasen la validación.' This names the exact alternative and provides a concrete when-to-use rule. It also explains the multi-CFDI behavior with anticipos, further guiding usage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: preview_factura is a dry-run, emitir_cfdi actually timbres, resolver_claves_sat finds SAT keys, and whoami checks identity. No overlap in functionality.

Naming Consistency4/5

Most tools follow a Spanish verb_noun pattern (emitir_cfdi, resolver_claves_sat), but preview_factura uses an English verb and whoami is a Unix command, introducing minor inconsistency.

Tool Count5/5

With only 4 tools, the set is well-scoped for a focused invoicing server: preview, emit, key resolution, and authentication. Each tool earns its place without bloat.

Completeness3/5

The core workflow (preview and emit CFDI) is covered, but the server lacks operations for canceling CFDIs, listing past emissions, or managing clients/anticipos, which are part of a full invoicing lifecycle.

Resources