Skip to main content
Glama
klodr

mercury-invoicing-mcp

mercury_update_invoice

Update an outstanding invoice by providing only the fields to change. Merges modifications—like line items, due date, memo, or PO number—with the current invoice before submission. Returns the updated invoice details.

Instructions

Update an existing invoice. Pass only the fields you want to change.

USE WHEN: amending an outstanding invoice (line items, due date, memo, PO number) before the customer pays. The MCP fetches the current invoice and merges your changes before submitting — Mercury's update endpoint requires the full payload despite the API docs implying PATCH.

DO NOT USE: to cancel an invoice (use mercury_cancel_invoice). To change the customer or the destination account, cancel + recreate. Once an invoice is paid, updates are likely rejected by Mercury — fetch first to confirm status.

SIDE EFFECTS: overwrites the invoice on Mercury's side. The customer-facing payment URL stays the same. If the invoice was already emailed, the customer is NOT re-notified of the change — communicate the change out-of-band if needed.

RETURNS: { id, status, amount, ... } — the updated invoice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceIdYesInvoice ID
invoiceDateNoInvoice date (YYYY-MM-DD)
dueDateNoDue date (YYYY-MM-DD)
lineItemsNo
ccEmailsNo
payerMemoNo
internalNoteNo
poNumberNo
invoiceNumberNo
Behavior5/5

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

Discloses that Mercury requires full payload despite PATCH semantics, side effects (overwrites invoice, payment URL unchanged, no re-notification), and likelihood of rejection for paid invoices. No annotations provided, so description carries full burden and meets it well.

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?

Well-structured with clear sections (USE WHEN, DO NOT USE, SIDE EFFECTS, RETURNS). Front-loaded with purpose. Every sentence is informative with no redundancy.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, description includes return fields and covers edge cases (paid invoices, line item limits, re-notification). Guidance on fetching first to confirm status adds completeness for a mutation tool.

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

Parameters4/5

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

Adds value beyond schema: explains merge behavior (pass only changed fields), and for 'lineItems' details a critical length constraint (name ≤200 chars) and Mercury's rejection behavior. Schema coverage is low (33%), but description compensates with additional context.

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?

Clearly states 'Update an existing invoice' with a specific verb and resource. Distinguishes from sibling 'mercury_cancel_invoice' and explains scope (only outstanding invoices before payment).

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

Usage Guidelines5/5

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

Explicit USE WHEN and DO NOT USE sections, naming alternatives like 'mercury_cancel_invoice' for cancellation and advising cancel+recreate for changing customer/account. Also warns about post-payment updates being rejected.

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/klodr/mercury-invoicing-mcp'

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