Skip to main content
Glama

list_expenses

Retrieve expense records from FreshBooks with optional filtering by client to track business spending and manage financial data.

Instructions

List expenses with optional client filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
per_pageNo
client_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the list_expenses MCP tool.
    async def list_expenses(
        page: int = 1,
        per_page: int = 25,
        client_id: int | None = None,
    ) -> str:
        """List expenses with optional client filter."""
        filters = {}
        if client_id:
            filters["clientid"] = client_id
        result = await client.accounting_list("expenses/expenses", page, per_page, filters)
        return _summarize_list(result, "expenses", ["id", "vendor", "amount", "date", "status", "categoryid"])
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 states the tool lists expenses with filtering, but doesn't describe pagination behavior (implied by page/per_page parameters), rate limits, authentication needs, or what the output contains. This is inadequate for a tool with multiple parameters and an output schema, leaving key behavioral traits unspecified.

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 a single, efficient sentence that front-loads the core purpose ('List expenses') and includes the key optional feature ('with optional client filter'). There is no wasted language, making it highly concise and well-structured for quick comprehension.

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 (3 parameters, output schema exists), the description is minimally adequate. The output schema reduces the need to explain return values, but the description lacks details on pagination behavior, filtering context, and usage guidelines. It meets a basic threshold but leaves significant gaps in guiding the agent effectively.

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 client filter,' which maps to the 'client_id' parameter, adding some semantic meaning. However, it doesn't explain the 'page' and 'per_page' parameters for pagination or provide details on client_id format/usage. The description adds partial value but doesn't fully address the coverage gap.

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 verb ('List') and resource ('expenses'), making the purpose immediately understandable. It also mentions an optional client filter, which adds specificity. However, it doesn't distinguish this tool from potential siblings like 'list_invoices' or 'list_estimates' beyond the resource name, preventing 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 prerequisites, context for filtering, or compare it to sibling tools like 'get_expense' for single items or 'list_invoices' for other resources. This leaves the agent with minimal direction on appropriate usage scenarios.

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