Skip to main content
Glama

get_payment

Retrieve the current status of a payment using its payment ID. No authentication needed.

Instructions

Check the status of a specific payment by its ID. No authentication required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentIdYesPayment ID (pay_...)

Implementation Reference

  • The core handler function for the 'get_payment' tool. It accepts a paymentId string, makes an unauthenticated GET request to /payments/{paymentId}, and returns the payment status response.
    // Tool 6: Get Payment
    server.tool(
      "get_payment",
      "Check the status of a specific payment by its ID. No authentication required.",
      {
        paymentId: z.string().describe("Payment ID (pay_...)"),
      },
      async ({ paymentId }) => {
        try {
          const res = await callApi("GET", `/payments/${paymentId}`, undefined, false);
          if (!res.ok) return errorResponse("Get payment failed", res);
          return successResponse(res.json);
        } catch (e) {
          return { content: [{ type: "text" as const, text: `Get payment error: ${e}` }], isError: true };
        }
      },
    );
  • Input schema for the get_payment tool: requires a 'paymentId' string parameter (described as 'Payment ID (pay_...)').
    {
      paymentId: z.string().describe("Payment ID (pay_...)"),
    },
  • src/index.ts:211-226 (registration)
    Registration of the tool named 'get_payment' via server.tool() on the McpServer instance. The registration includes its description ('Check the status of a specific payment by its ID. No authentication required.'), schema, and handler.
    server.tool(
      "get_payment",
      "Check the status of a specific payment by its ID. No authentication required.",
      {
        paymentId: z.string().describe("Payment ID (pay_...)"),
      },
      async ({ paymentId }) => {
        try {
          const res = await callApi("GET", `/payments/${paymentId}`, undefined, false);
          if (!res.ok) return errorResponse("Get payment failed", res);
          return successResponse(res.json);
        } catch (e) {
          return { content: [{ type: "text" as const, text: `Get payment error: ${e}` }], isError: true };
        }
      },
    );
Behavior3/5

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

No annotations are provided, so the description carries full burden. It states the tool is read-only and requires no authentication, which are key behavioral traits. However, it does not detail error handling or possible status values, leaving some transparency gaps.

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 extremely concise with two sentences, no redundant information. Every word contributes to understanding the tool's purpose and a key constraint (no auth).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description covers the core purpose and a notable behavioral attribute. It lacks detail on return format or possible statuses, but given the tool's simplicity, it is largely complete.

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% for the single parameter paymentId, which is clearly described as 'Payment ID (pay_...)'. The description adds context ('Check the status') but does not significantly enhance meaning beyond the schema.

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 'Check the status of a specific payment by its ID', which is a specific verb-resource combination. It distinguishes from sibling tools like list_payments (which lists multiple) and send_payment (which creates payments).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions 'No authentication required', which is a usage condition but does not explicitly guide when to use this tool versus alternatives like list_payments or send_payment. Usage is implied but not fully specified.

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/mrocker/cardzero-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server