Skip to main content
Glama
mcp-sri-ecuador

mcp-sri-ecuador

Generar XML de factura

sri_generar_factura_xml
Read-only

Generates unsigned Ecuadorian SRI electronic invoice XML (v1.1.0) with calculated totals and IVA so you can review it before issuing.

Instructions

Construye el XML de una factura electrónica (versión 1.1.0) con totales e IVA calculados, sin firmar ni enviar. Útil para revisar antes de emitir.

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": {
      "fechaEmision": "<fechaEmision>",
      "secuencial": "<secuencial>",
      "emisor": "<emisor>",
      "comprador": "<comprador>",
      "items": "<items>"
    },
    "name": "sri_generar_factura_xml"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
pagosNo
emisorYes
propinaNo
ambienteNoAmbiente del SRI. Por defecto: el configurado en SRI_AMBIENTE o 'pruebas'.
compradorYes
secuencialYes
fechaEmisionYesaaaa-mm-dd o dd/mm/aaaa
puntoEmisionNo001
infoAdicionalNoCampos adicionales, p. ej. { Email: '...' }
codigoNumericoNo
establecimientoNo001

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds real behavioral content by telling the agent that totals and IVA are computed for it and that no signing or transmission occurs, so the agent knows this is a pure construction step. It stops short of describing what is returned (raw XML string vs. file path) or how validation failures surface.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with the action and its scope front-loaded, followed by the practical use case. No filler, no repetition of the title.

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

Completeness2/5

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

For a tool with 12 parameters, deep nesting and no output schema, the description is far too thin — an agent cannot tell what the call returns or how to populate most required inputs. The absence of an output schema makes some explanation of the produced artefact (XML string, storage) especially necessary.

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

Parameters2/5

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

With 12 parameters (5 required, nested emisor/comprador/items objects) and only 25% schema description coverage, the description must compensate but does not — it mentions IVA and totals only implicitly and explains nothing about fechaEmision, secuencial, ambiente, puntoEmision, propina, pagos or infoAdicional. The two formats the schema does document (tarifaIva values, ambiente default) are not reinforced in prose.

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 a specific verb and resource ('Construye el XML de una factura electrónica (versión 1.1.0)') plus the computed scope (totales e IVA) and an explicit boundary ('sin firmar ni enviar') that separates it from the signing and sending siblings. It does not name any alternative tool, so differentiation is inferred rather than stated.

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?

'Útil para revisar antes de emitir' implies a preview step in an emission pipeline, which gives usable context. However, it never says what to call instead when the agent actually wants to sign or send, nor what prerequisites (e.g. a valid RUC, configured ambiente) must be met.

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