Skip to main content
Glama

list_invoices

Retrieve and filter invoices from Siigo with pagination by date range or customer name to manage billing records.

Instructions

List invoices with pagination and optional filters.

Args: page: Page number (starts at 1) page_size: Number of results per page (max 100) date_start: Filter by start date (YYYY-MM-DD format) date_end: Filter by end date (YYYY-MM-DD format) customer_name: Filter by customer name (partial match)

Returns paginated list of invoices with navigation links.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
page_sizeNo
date_startNo
date_endNo
customer_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'list_invoices' tool. It is decorated with @mcp.tool for MCP registration and implements the logic to fetch invoices from the Siigo API with pagination and optional date/customer filters.
    async def list_invoices(
        ctx: Context,
        page: int = 1,
        page_size: int = 25,
        date_start: str | None = None,
        date_end: str | None = None,
        customer_name: str | None = None,
    ) -> dict[str, Any]:
        """List invoices with pagination and optional filters.
    
        Args:
            page: Page number (starts at 1)
            page_size: Number of results per page (max 100)
            date_start: Filter by start date (YYYY-MM-DD format)
            date_end: Filter by end date (YYYY-MM-DD format)
            customer_name: Filter by customer name (partial match)
    
        Returns paginated list of invoices with navigation links.
        """
        params: dict[str, Any] = {"page": page, "page_size": min(page_size, 100)}
        if date_start:
            params["date_start"] = date_start
        if date_end:
            params["date_end"] = date_end
        if customer_name:
            params["name"] = customer_name
    
        return await get_client(ctx).get("/invoices", params=params)
  • Metadata definition in TOOL_INDEX list, providing the tool's name, category, and summary for discovery purposes in lazy loading mode.
    {"name": "list_invoices", "category": "invoices", "summary": "List invoices with pagination and filters"},
  • Registration of the 'list_invoices' tool in the dynamic tool function mapping used by discovery tools for lazy execution.
    "list_invoices": invoices.list_invoices,
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses pagination behavior and optional filtering, which are useful traits. However, it doesn't mention authentication needs, rate limits, error handling, or whether this is a read-only operation (though implied by 'List'), leaving gaps in behavioral context for a tool with multiple parameters.

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 well-structured: a brief overview sentence front-loads the purpose, followed by a clear 'Args' section with bullet-point-like explanations for each parameter, and a final sentence on returns. Every sentence earns its place without redundancy or fluff.

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 5 parameters with 0% schema coverage and an output schema present (so return values needn't be detailed), the description is largely complete. It covers all parameters thoroughly and mentions pagination with navigation links. However, it lacks context on authentication, errors, or sibling tool differentiation, which could be useful for a list tool in this server.

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%, so the description must compensate fully. It provides clear semantics for all 5 parameters: page (starts at 1), page_size (max 100), date_start/end (YYYY-MM-DD format), and customer_name (partial match). This adds significant value beyond the bare schema, explaining formats, constraints, and behaviors not evident from the schema alone.

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?

The description clearly states the tool's purpose with a specific verb ('List') and resource ('invoices'), and mentions key features like pagination and filtering. However, it doesn't explicitly distinguish this tool from sibling tools like 'list_credit_notes' or 'list_customers' which follow similar patterns, missing full sibling differentiation.

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?

The description implies usage context by mentioning pagination and filtering capabilities, suggesting this is for retrieving multiple invoices with optional constraints. However, it lacks explicit guidance on when to use this versus alternatives like 'get_invoice' (for single invoices) or other list tools, and doesn't state any exclusions or prerequisites.

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