Skip to main content
Glama

list_invoices

Retrieve and filter invoices from Siigo with pagination, date ranges, and customer name search 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

Implementation Reference

  • The core handler function for the 'list_invoices' tool. Decorated with @mcp.tool, it accepts pagination and filter parameters, constructs API params, and fetches the list of invoices from the Siigo API endpoint '/invoices'.
    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)
  • Discovery schema entry in TOOL_INDEX list, defining the tool's name, category, and summary description for dynamic tool listing.
    {"name": "list_invoices", "category": "invoices", "summary": "List invoices with pagination and filters"},
  • Tool registration mapping in the lazy-loading _tool_functions dictionary, associating the 'list_invoices' name with the imported function from invoices module for dynamic execution.
    "list_invoices": invoices.list_invoices,

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