Skip to main content
Glama
klodr

mercury-invoicing-mcp

mercury_cancel_invoice

Cancel outstanding invoices with automatic customer notification if already sent. Ideal for correcting errors, disputes, or re-issuing with corrected line items. Not for paid invoices.

Instructions

Cancel an outstanding invoice. Mercury sends a cancellation notice to the customer if the invoice was already emailed.

USE WHEN: voiding an invoice that was issued in error, that the customer disputes, or that needs to be re-issued under a corrected line-item set. ALWAYS confirm with the user before calling — the customer-facing notification is automatic.

DO NOT USE: on an invoice already paid (Mercury rejects cancellation). To refund a paid invoice, refund out-of-band via the bank, then optionally update the internal note.

SIDE EFFECTS: marks the invoice as cancelled on Mercury. The customer-facing payment URL stops accepting payments. If the invoice was emailed, Mercury notifies the customer of the cancellation by email — confirm with the user before calling. The action is logged in Mercury's audit trail. Cancellation is final from the API perspective.

RETURNS: { id, status: "cancelled", ... }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceIdYesInvoice ID
Behavior5/5

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

Details side effects: marks as cancelled, stops payment URL, customer notification if emailed, audit logging, finality. With no annotations, description fully covers behavioral traits.

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, bullet points, and front-loaded purpose. Every sentence adds value; no redundancy or fluff.

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, includes a RETURNS section with example response. Covers all needed context: when to use, side effects, return format, parameter. Complete for this simple tool.

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?

Single parameter invoiceId has 100% schema coverage (UUID with regex). Description adds no extra meaning beyond what schema provides; baseline of 3 appropriate.

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 'Cancel an outstanding invoice' and lists specific use cases (error, dispute, re-issue). Distinguishes from siblings like mercury_create_invoice, mercury_update_invoice.

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, including warning not to cancel paid invoices and guidance to refund out-of-band. Emphasizes confirming with user due to automatic customer notification.

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