Skip to main content
Glama

get_stamp_errors

Check DIAN validation errors for rejected invoices in Siigo to identify why electronic invoicing failed.

Instructions

Get DIAN rejection errors for an invoice.

Args: invoice_id: The invoice's GUID

Returns any errors from DIAN if the stamp was rejected. Use this to understand why an invoice failed DIAN validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function decorated with @mcp.tool that implements the tool logic by querying the Siigo API for DIAN stamp errors on the given invoice.
    @mcp.tool
    async def get_stamp_errors(ctx: Context, invoice_id: str) -> dict[str, Any]:
        """Get DIAN rejection errors for an invoice.
    
        Args:
            invoice_id: The invoice's GUID
    
        Returns any errors from DIAN if the stamp was rejected.
        Use this to understand why an invoice failed DIAN validation.
        """
        return await get_client(ctx).get(f"/invoices/{invoice_id}/stamp/errors")
  • Registers the get_stamp_errors tool in the lazy-loading tool functions dictionary, mapping the name to the imported function from invoices module.
    "get_stamp_errors": invoices.get_stamp_errors,
  • Provides metadata including name, category, and summary description for the tool in the discovery index used by list_siigo_tools.
    {"name": "get_stamp_errors", "category": "invoices", "summary": "Get DIAN rejection errors"},
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool retrieves errors for rejected stamps, implying a read-only operation, but lacks details on permissions, rate limits, or error handling. It adds some context about DIAN validation but does not fully describe behavioral traits beyond the basic purpose.

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?

The description is appropriately sized and front-loaded, with the purpose stated first, followed by parameter details and usage guidance in clear, concise sentences. Every sentence adds value without redundancy.

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?

Given the tool's moderate complexity (one parameter, no annotations, but with an output schema), the description is mostly complete. It explains the purpose, parameter, and usage context. However, it could improve by addressing potential edge cases or linking to the output schema for return value details, though the output schema reduces the need for that.

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

Parameters4/5

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

The description adds meaning beyond the input schema by explaining that 'invoice_id' is 'The invoice's GUID' and that it is used to fetch rejection errors. With 0% schema description coverage and only one parameter, this compensates well, though it could provide more detail on the GUID format or validation.

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 clearly states the tool's purpose with a specific verb ('Get') and resource ('DIAN rejection errors for an invoice'), and it distinguishes itself from sibling tools by focusing on stamp rejection errors rather than general invoice data or other resources like customers or products.

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 description provides clear context on when to use this tool ('if the stamp was rejected' and 'to understand why an invoice failed DIAN validation'), but it does not explicitly mention when not to use it or name alternatives among the sibling tools, such as 'get_invoice' for general invoice details.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dsfaccini/siigo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server