Skip to main content
Glama

list_credit_notes

Retrieve paginated credit notes from Siigo with optional date filters to manage refunds and adjustments efficiently.

Instructions

List credit notes 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)

Returns paginated list of credit notes with navigation links.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
page_sizeNo
date_startNo
date_endNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'list_credit_notes' tool. It fetches credit notes from the Siigo API endpoint '/credit-notes' with pagination and optional date range filters.
    @mcp.tool
    async def list_credit_notes(
        ctx: Context,
        page: int = 1,
        page_size: int = 25,
        date_start: str | None = None,
        date_end: str | None = None,
    ) -> dict[str, Any]:
        """List credit notes 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)
    
        Returns paginated list of credit notes 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
    
        return await get_client(ctx).get("/credit-notes", params=params)
  • Registers the list_credit_notes function (and related credit note tools) in the dynamic tool functions map used for lazy loading.
    # Credit notes
    "list_credit_notes": credit_notes.list_credit_notes,
    "get_credit_note": credit_notes.get_credit_note,
    "create_credit_note": credit_notes.create_credit_note,
    "get_credit_note_pdf": credit_notes.get_credit_note_pdf,
  • TOOL_INDEX entry providing discovery metadata (name, category, summary) for the list_credit_notes tool, used by list_siigo_tools.
    # Credit notes
    {"name": "list_credit_notes", "category": "credit_notes", "summary": "List credit notes with pagination"},
    {"name": "get_credit_note", "category": "credit_notes", "summary": "Get a credit note by ID"},
    {"name": "create_credit_note", "category": "credit_notes", "summary": "Create a new credit note"},
    {"name": "get_credit_note_pdf", "category": "credit_notes", "summary": "Download credit note as PDF"},
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 date filtering, which is helpful. However, it doesn't mention authentication requirements, rate limits, error conditions, or whether this is a read-only operation (though 'list' implies reading). The description adds some behavioral context but leaves significant gaps unaddressed.

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 clear purpose statement followed by parameter details and return information. Every sentence adds value, though the 'Args:' section could be slightly more integrated. It's appropriately sized for a tool with 4 parameters and no annotations.

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, 4 parameters with 0% schema coverage, and the presence of an output schema (so return values don't need explanation), the description is quite complete. It covers purpose, parameters, and pagination behavior. The main gap is lack of authentication/error context, but the output schema reduces the completeness burden.

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?

With 0% schema description coverage, the description fully compensates by explaining all 4 parameters: their purposes, formats, and constraints. It clarifies that 'page' starts at 1, 'page_size' has a max of 100, and date filters use YYYY-MM-DD format. This adds substantial meaning beyond the bare schema.

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 specific action ('List credit notes') and distinguishes it from sibling tools like 'get_credit_note' (singular retrieval) and 'list_invoices' (different resource). It explicitly mentions pagination and filtering capabilities, providing a precise scope that differentiates it from other list operations.

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 implies usage context through 'with pagination and optional filters' and distinguishes from 'get_credit_note' by being a list operation. However, it doesn't explicitly state when to use this tool versus alternatives like 'list_invoices' or provide exclusion criteria, leaving some guidance implicit rather than explicit.

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