Skip to main content
Glama
klodr

mercury-invoicing-mcp

mercury_get_account

Retrieve full details for a specific Mercury deposit account using its ID. Faster than re-listing accounts when you already have the ID. Returns balance, status, account and routing numbers.

Instructions

Retrieve details for a specific Mercury deposit account by ID.

USE WHEN: fetching the full detail of a single account whose ID is already known (typically from mercury_list_accounts). Faster than re-listing when you already have the ID.

DO NOT USE: to enumerate accounts (use mercury_list_accounts). For IO Credit accounts (use the mercury_list_credit_accounts endpoint).

RETURNS: { id, name, kind, status, availableBalance, currentBalance, accountNumber, routingNumber, ... }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesThe Mercury account ID

Implementation Reference

  • The main handler function that executes the mercury_get_account tool logic. It calls client.get('/account/{accountId}') with the provided accountId UUID and returns the result via textResult.
    defineTool(
      server,
      "mercury_get_account",
      [
        "Retrieve details for a specific Mercury deposit account by ID.",
        "",
        "USE WHEN: fetching the full detail of a single account whose ID is already known (typically from `mercury_list_accounts`). Faster than re-listing when you already have the ID.",
        "",
        "DO NOT USE: to enumerate accounts (use `mercury_list_accounts`). For IO Credit accounts (use the `mercury_list_credit_accounts` endpoint).",
        "",
        "RETURNS: `{ id, name, kind, status, availableBalance, currentBalance, accountNumber, routingNumber, ... }`.",
      ].join("\n"),
      {
        accountId: z.string().uuid().describe("The Mercury account ID"),
      },
      async ({ accountId }) => {
        const data = await client.get(`/account/${accountId}`);
        return textResult(data);
      },
    );
  • Zod input schema requiring a single 'accountId' parameter of type UUID string with a description.
    {
      accountId: z.string().uuid().describe("The Mercury account ID"),
    },
  • The tool 'mercury_get_account' is registered via defineTool in the registerAccountTools function, which is called from src/tools/index.ts's registerAllTools.
    defineTool(
      server,
      "mercury_get_account",
      [
        "Retrieve details for a specific Mercury deposit account by ID.",
        "",
        "USE WHEN: fetching the full detail of a single account whose ID is already known (typically from `mercury_list_accounts`). Faster than re-listing when you already have the ID.",
        "",
        "DO NOT USE: to enumerate accounts (use `mercury_list_accounts`). For IO Credit accounts (use the `mercury_list_credit_accounts` endpoint).",
        "",
        "RETURNS: `{ id, name, kind, status, availableBalance, currentBalance, accountNumber, routingNumber, ... }`.",
      ].join("\n"),
      {
        accountId: z.string().uuid().describe("The Mercury account ID"),
      },
      async ({ accountId }) => {
        const data = await client.get(`/account/${accountId}`);
        return textResult(data);
      },
    );
  • The defineTool helper that registers the tool on the MCP server with name, description, inputSchema, and a wrapped handler.
    export function defineTool<S extends ZodRawShape>(
      server: McpServer,
      name: string,
      description: string,
      inputSchema: S,
      handler: (args: z.infer<z.ZodObject<S>>) => Promise<ToolResult>,
    ): void {
      const wrapped = wrapToolHandler(name, handler);
      const strictSchema = z.object(inputSchema).strict();
      server.registerTool(name, { description, inputSchema: strictSchema }, wrapped);
    }
Behavior4/5

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

No annotations provided, so description carries the burden. It discloses that the tool returns full account details for a single ID and notes it is faster than re-listing. It does not mention side effects or auth requirements, but as a read operation this is acceptable. The return format example adds transparency.

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 brief and well-structured with USE WHEN, DO NOT USE, and RETURNS sections. Every sentence adds value, no wasted words.

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 provides a sample return object showing fields. It covers usage, alternatives, and return format completely for a simple single-get operation.

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 description coverage is 100%; the accountId parameter is well-described in the schema with format and pattern. The description adds context about using the ID from list_accounts but does not add new semantic information beyond the schema baseline.

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 'Retrieve details for a specific Mercury deposit account by ID,' using a specific verb and resource. It distinguishes from sibling tools like mercury_list_accounts and mercury_list_credit_accounts.

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 context for when to use this tool versus alternatives, including naming mercury_list_accounts for enumeration and mercury_list_credit_accounts for IO Credit accounts.

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