Skip to main content
Glama

get_payment

Check the status of a PayBot payment by providing a payment ID to monitor transaction progress and confirm completion.

Instructions

Get the status of a PayBot payment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentIdYesThe payment ID to look up

Implementation Reference

  • src/index.ts:61-72 (registration)
    The tool registration for 'get_payment' which defines the input schema (paymentId) and the handler function that executes the tool logic
    // Tool: get_payment
    server.tool(
      'get_payment',
      'Get the status of a PayBot payment',
      {
        paymentId: z.string().describe('The payment ID to look up'),
      },
      async ({ paymentId }) => {
        const result = await paybotRequest('GET', `/v1/payments/${paymentId}`);
        return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };
      },
    );
  • The actual handler function that executes the get_payment tool logic - makes a GET request to /v1/payments/{paymentId} and returns the result
    async ({ paymentId }) => {
      const result = await paybotRequest('GET', `/v1/payments/${paymentId}`);
      return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };
    },
  • Input schema definition for the get_payment tool - accepts a paymentId string parameter
    {
      paymentId: z.string().describe('The payment ID to look up'),
  • The paybotRequest helper function used by get_payment handler to make authenticated API requests to the PayBot backend
    async function paybotRequest<T>(method: string, path: string, body?: unknown): Promise<T> {
      const response = await fetch(`${PAYBOT_BASE_URL}${path}`, {
        method,
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Bearer ${PAYBOT_API_KEY}`,
        },
        body: body ? JSON.stringify(body) : undefined,
      });
    
      if (!response.ok) {
        const errorBody = await response.text().catch(() => 'Unknown error');
        throw new Error(`PayBot API error (${response.status}): ${errorBody}`);
      }
    
      return (await response.json()) as T;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves payment status, implying a read-only operation, but doesn't clarify if it requires authentication, has rate limits, or what the response format might be. This is a significant gap for a tool with zero annotation coverage.

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?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and easy to parse, though it could be slightly more informative by including usage context without sacrificing brevity.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., status details, error handling) or behavioral aspects like authentication needs. For a tool with no structured data beyond the input schema, more context is needed to be fully helpful to an agent.

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?

The input schema has 100% description coverage, with the 'paymentId' parameter fully documented in the schema. The description doesn't add any meaning beyond what the schema provides, such as format examples or constraints. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('status of a PayBot payment'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_payments' or 'pay', which would require mentioning this is for retrieving a single payment's status rather than listing multiple payments or initiating a payment.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_payments' for multiple payments or 'pay' for initiating payments, nor does it specify prerequisites such as needing a payment ID. This leaves the agent without context for tool selection.

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/RBKunnela/paybot-mcp'

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