Skip to main content
Glama

list_invoices

Retrieve and filter invoices from FreshBooks by status, customer, or pagination to manage billing records.

Instructions

List invoices with optional filters. Status: draft, sent, viewed, outstanding, paid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
per_pageNo
statusNo
customer_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Implementation of the 'list_invoices' MCP tool, which fetches invoice data from the FreshBooks client and summarizes it.
    async def list_invoices(
        page: int = 1,
        per_page: int = 25,
        status: str | None = None,
        customer_id: int | None = None,
    ) -> str:
        """List invoices with optional filters. Status: draft, sent, viewed, outstanding, paid."""
        filters = {}
        if status:
            filters["display_status"] = status
        if customer_id:
            filters["customerid"] = customer_id
        result = await client.accounting_list(
            "invoices/invoices", page, per_page, filters, includes=["lines"]
        )
        return _summarize_list(result, "invoices", ["id", "invoice_number", "display_status", "amount", "outstanding", "customerid", "due_date"])
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions optional filters and lists status values, but fails to describe key behaviors: whether this is a read-only operation, if it requires authentication, pagination behavior (implied by parameters but not explained), rate limits, or what the output contains. For a listing tool with zero annotation coverage, this leaves significant gaps.

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 brief and front-loaded with the core purpose. The single sentence efficiently communicates the action and filtering capability, and the status enumeration is concise. There's no wasted text, though it could be slightly more structured (e.g., separating purpose from parameter details).

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

Completeness3/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, no annotations, but with an output schema), the description is minimally adequate. The output schema likely covers return values, reducing the need for output explanation. However, the description lacks context on authentication, pagination behavior, and sibling tool differentiation, making it incomplete for optimal agent use.

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

Parameters3/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. It mentions 'optional filters' and enumerates status values ('draft, sent, viewed, outstanding, paid'), which clarifies the 'status' parameter. However, it doesn't explain 'page', 'per_page', or 'customer_id' parameters, leaving three of four parameters without semantic context. The partial coverage justifies a baseline score.

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: 'List invoices with optional filters.' It specifies the verb ('list') and resource ('invoices'), and mentions filtering capabilities. However, it doesn't explicitly differentiate from sibling tools like 'get_invoice' (singular retrieval) or 'list_estimates' (different resource), which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'list_invoices' over 'get_invoice' (for single invoice retrieval) or 'list_estimates' (for a different resource type), nor does it specify prerequisites or exclusions. The mention of filters is functional but not contextual.

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/AlexlaGuardia/MCP-Freshbooks'

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