Skip to main content
Glama
klodr

mercury-invoicing-mcp

mercury_update_recipient

Update an existing payment recipient's legal name, nickname, contact emails, or default payment method. Use for amending contact info or re-routing payments via a different method without recreating the recipient.

Instructions

Update an existing payment recipient (legal name, nickname, contact emails, default payment method).

USE WHEN: amending a recipient's contact info or default payment method after creation. Useful for re-routing future payments to a recipient via a different method (e.g. ACH → wire) without recreating it.

DO NOT USE: to change the bank account number / routing number — that requires a fresh recipient (security policy on Mercury's side). Use mercury_add_recipient for the new banking info.

SIDE EFFECTS: writes the recipient record on Mercury. Persistent. Only the fields you pass are changed. Mercury endpoint is POST /recipient/{id} (SINGULAR — not the plural /recipients/{id}).

RETURNS: { id, name, nickname, defaultPaymentMethod, ... } — the updated recipient.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipientIdYesThe recipient ID
nameNoRecipient legal name
nicknameNoInternal nickname
contactEmailNoPrimary contact email
emailsNoList of email addresses
defaultPaymentMethodNo

Implementation Reference

  • The async handler function for mercury_update_recipient. It destructures recipientId from args and passes remaining fields as body to POST /recipient/{recipientId}.
    async ({ recipientId, ...body }) => {
      const data = await client.post(`/recipient/${recipientId}`, body);
      return textResult(data);
    },
  • Zod input schema for mercury_update_recipient: requires recipientId (UUID), optional name, nickname, contactEmail (email), emails (array of emails), and defaultPaymentMethod (enum).
    {
      recipientId: z.string().uuid().describe("The recipient ID"),
      name: z.string().optional().describe("Recipient legal name"),
      nickname: z.string().optional().describe("Internal nickname"),
      contactEmail: z.string().email().optional().describe("Primary contact email"),
      emails: z.array(z.string().email()).optional().describe("List of email addresses"),
      defaultPaymentMethod: z
        .enum(["domesticAch", "internationalWire", "domesticWire", "check"])
        .optional(),
    },
  • Registration of the mercury_update_recipient tool via defineTool() on the McpServer, with description, input schema, and handler.
    defineTool(
      server,
      "mercury_update_recipient",
      [
        "Update an existing payment recipient (legal name, nickname, contact emails, default payment method).",
        "",
        "USE WHEN: amending a recipient's contact info or default payment method after creation. Useful for re-routing future payments to a recipient via a different method (e.g. ACH → wire) without recreating it.",
        "",
        "DO NOT USE: to change the bank account number / routing number — that requires a fresh recipient (security policy on Mercury's side). Use `mercury_add_recipient` for the new banking info.",
        "",
        "SIDE EFFECTS: writes the recipient record on Mercury. Persistent. Only the fields you pass are changed. Mercury endpoint is `POST /recipient/{id}` (SINGULAR — not the plural `/recipients/{id}`).",
        "",
        "RETURNS: `{ id, name, nickname, defaultPaymentMethod, ... }` — the updated recipient.",
      ].join("\n"),
      {
        recipientId: z.string().uuid().describe("The recipient ID"),
        name: z.string().optional().describe("Recipient legal name"),
        nickname: z.string().optional().describe("Internal nickname"),
        contactEmail: z.string().email().optional().describe("Primary contact email"),
        emails: z.array(z.string().email()).optional().describe("List of email addresses"),
        defaultPaymentMethod: z
          .enum(["domesticAch", "internationalWire", "domesticWire", "check"])
          .optional(),
      },
      async ({ recipientId, ...body }) => {
        const data = await client.post(`/recipient/${recipientId}`, body);
        return textResult(data);
      },
    );
  • Import and call of registerRecipientTools which registers all recipient tools including mercury_update_recipient.
    import { registerRecipientTools } from "./recipients.js";
    import { registerStatementTools } from "./statements.js";
    import { registerTreasuryTools } from "./treasury.js";
    import { registerInvoiceTools } from "./invoices.js";
    import { registerCustomerTools } from "./customers.js";
    import { registerWebhookTools } from "./webhooks.js";
    
    /**
     * Register all Mercury MCP tools on the server.
     * Tools are organized by domain.
     */
    export function registerAllTools(server: McpServer, client: MercuryClient): void {
      // Banking
      registerAccountTools(server, client);
      registerCardTools(server, client);
      registerCreditTools(server, client);
      registerTransactionTools(server, client);
      registerRecipientTools(server, client);
  • Maps mercury_update_recipient to the 'recipients_update' rate-limit bucket, and at line 75 sets default limits of 2/day and 15/month.
    mercury_update_recipient: "recipients_update",
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: states it writes persistently, only changes passed fields, and gives the API endpoint. No contradictions.

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?

Well-structured with headings, front-loaded purpose, and clear sections. Slightly verbose but every sentence adds value.

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, the description explains the return structure and covers all essential aspects for correct invocation, including side effects and API details.

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?

Schema coverage is 83%, so baseline is 3. The description summarizes updatable fields but does not add significant meaning beyond what the schema provides (e.g., formats, patterns).

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 the verb 'Update' and the resource 'payment recipient', listing updatable fields (legal name, nickname, contact emails, default payment method). It distinguishes from sibling tools like mercury_add_recipient by context.

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, including an alternative tool for changing bank account numbers (mercury_add_recipient).

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