Skip to main content
Glama
klodr

mercury-invoicing-mcp

mercury_create_invoice

Create an invoice for an existing Mercury customer and optionally email it with a payment link.

Instructions

Create a new invoice (one-shot or to be sent recurrently). Requires AR write scope.

USE WHEN: billing a customer that already exists in Mercury (customerId from mercury_create_customer or mercury_list_customers). Set sendEmailOption: "SendNow" to email the invoice immediately to the customer's contact email.

DO NOT USE: when the customer does not exist yet (call mercury_create_customer first). To attach a file to the invoice, use the Mercury web app at creation time — the API attachment-upload endpoint is not exposed by this MCP currently.

SIDE EFFECTS: writes a new invoice to Mercury. Persistent. With sendEmailOption: "SendNow" (the default), Mercury also sends a real email with a payment link to the customer — confirm the customer's email and the line items before calling. Mercury Plus tier required for the AR write scope.

RETURNS: { id, status, amount, paymentUrl, ... }paymentUrl is the Mercury-hosted page where the customer pays.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dueDateYesDue date (YYYY-MM-DD)
ccEmailsNoCC emails for notifications
poNumberNoPurchase order number
lineItemsYesInvoice line items
payerMemoNoMemo shown to payer
customerIdYesCustomer ID (created via mercury_create_customer)
invoiceDateYesInvoice date (YYYY-MM-DD)
internalNoteNoNote visible only to your org
invoiceNumberNoCustomer-facing invoice number (≤255 chars; Mercury rejects 300+ characters on the edit endpoint)
achDebitEnabledNoAllow ACH debit payments. Default: true
sendEmailOptionNoWhether to email the invoice immediately. Default: SendNow
creditCardEnabledNoAllow credit card payments. Default: true
destinationAccountIdYesMercury account ID where invoice payments will be deposited
servicePeriodEndDateNoService period end (YYYY-MM-DD)
useRealAccountNumberNoShow real (vs virtual) account number on the invoice. Default: false
servicePeriodStartDateNoService period start (YYYY-MM-DD)
Behavior5/5

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

The description discloses side effects: writes a persistent invoice, sends a real email with payment link when sendEmailOption is default, and requires Mercury Plus tier. Annotations only have openWorldHint and destructiveHint; the description adds much-needed behavioral context (persistence, email sending, tier requirement) without contradicting annotations.

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 well-organized into purpose, USE WHEN, DO NOT USE, SIDE EFFECTS, and RETURNS sections. It is front-loaded with the core purpose, each sentence earns its place, and the length is appropriate given the tool's 16 parameters.

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?

Given the complexity (16 params, no output schema), the description covers prerequisites, side effects, return structure, and edge cases (attachment limitation). It also warns about email sending and tier requirement, making it complete for an AI agent to invoke correctly.

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?

Input schema has 100% description coverage, so baseline is 3. The description adds extra meaning for key parameters: explains customerId source, highlights lineItems.name 200-char limit and workaround, and clarifies sendEmailOption default. This goes beyond schema descriptions for critical parameters, justifying a 4.

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?

The description clearly states 'Create a new invoice (one-shot or to be sent recurrently)' with a specific verb and resource. It distinguishes from sibling tools like mercury_cancel_invoice and mercury_create_customer by providing explicit 'USE WHEN' and 'DO NOT USE' conditions.

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?

The description provides explicit 'USE WHEN' and 'DO NOT USE' sections, including when to call mercury_create_customer first. It also advises on setting sendEmailOption to 'SendNow' for immediate email, giving clear context for when to use the tool versus alternatives.

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