Skip to main content
Glama

update_invoice

Modify existing invoice details in FreshBooks by providing invoice ID and field updates to correct errors or reflect changes.

Instructions

Update an invoice. Pass any writable invoice fields as updates dict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYes
updatesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler for the update_invoice tool. It is registered with @mcp.tool() and uses the client to perform the accounting_update.
    @mcp.tool()
    @_handle_errors
    async def update_invoice(invoice_id: int, updates: dict) -> str:
        """Update an invoice. Pass any writable invoice fields as updates dict."""
        result = await client.accounting_update("invoices/invoices", invoice_id, "invoice", updates)
        inv = result.get("invoice", result)
        return f"Invoice #{inv.get('invoice_number', '?')} updated."
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 this is an update operation, implying mutation, but lacks critical details: it doesn't specify required permissions, whether changes are reversible, rate limits, error conditions, or what the output contains. The phrase 'writable invoice fields' hints at constraints but is vague.

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 very concise—two sentences with no wasted words. It front-loads the core action ('Update an invoice') and follows with parameter guidance. However, it could be more structured by explicitly 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 complexity (mutation with nested objects) and lack of annotations, the description is incomplete. It doesn't cover behavioral aspects like side effects or error handling. The presence of an output schema mitigates this slightly, as return values are documented elsewhere, but the description should still address usage context and parameter meaning more thoroughly.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds minimal semantics: it clarifies that 'updates' is a dict of writable fields, but doesn't explain what 'invoice_id' is, what fields are writable, their formats, or constraints. For a tool with 2 parameters and nested objects, this is insufficient compensation for the schema 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 action ('Update') and resource ('invoice'), making the purpose immediately understandable. It distinguishes from siblings like 'create_invoice' and 'delete_invoice' by specifying it modifies existing invoices. However, it doesn't explicitly differentiate from 'update_client' or other update tools beyond the resource type.

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 (e.g., needing an existing invoice), exclusions (e.g., what fields cannot be updated), or comparisons with related tools like 'send_invoice' or 'delete_invoice'. The agent must infer usage from context alone.

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