Skip to main content
Glama
klodr

mercury-invoicing-mcp

mercury_cancel_invoice

Destructive

Cancel an outstanding invoice and automatically notify the customer if it was already emailed. Use for invoices issued in error, disputed, or requiring re-issuance.

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?

Discloses side effects: marks invoice cancelled, stops payment URL, emails customer if previously emailed, logs audit trail, and finality. Complements annotations (destructiveHint=true, openWorldHint=true) with actionable details. No contradiction.

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?

Description is well-organized: action, side effects, usage constraints, and return format. Every sentence adds value without redundancy. Front-loaded with key information.

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?

Covers all necessary context: purpose, prerequisites (invoice must be outstanding), side effects, and expected return. No output schema is needed as description provides sample response. Complete for an experienced user.

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' with minimal description in schema, but schema coverage is 100%. Description adds no additional semantics beyond stating it's an Invoice ID. Baseline score (3) is appropriate as schema fully describes the parameter.

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?

Description clearly states the tool cancels an outstanding invoice, with specific use cases (voiding errors, disputes, re-issuance). Distinct from sibling tools like create or update, and 'DO NOT USE' clause clarifies boundaries.

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 provide clear guidance on appropriate and inappropriate scenarios. Emphasizes user confirmation due to automatic customer notification, which is critical for decision-making.

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