Skip to main content
Glama

get_payment

Read-onlyIdempotent

Retrieve a specific payment record by its unique ID. Access payment details from the Eduframe system.

Instructions

Get one payment record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the payment to retrieve

Implementation Reference

  • Registration and handler for the 'get_payment' tool. Calls API GET /payments/{id} and returns a formatted payment record.
    server.registerTool(
      "get_payment",
      {
        description: "Get one payment record",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the payment to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/payments/${id}`);
          void logResponse("get_payment", { id }, record);
          return formatShow(record, "payment");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for 'get_payment' - requires a positive integer 'id' field with description 'ID of the payment to retrieve'.
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the payment to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/payments/${id}`);
          void logResponse("get_payment", { id }, record);
          return formatShow(record, "payment");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • registerAllTools iterates over all tool registrations including registerPaymentTools which registers 'get_payment'.
    export function registerAllTools(server: McpServer): void {
      for (const register of tools) {
        register(server);
      }
    }
  • registerPaymentTools is included in the tools array in src/tools/index.ts, which is iterated by registerAllTools.
    registerPaymentTools,
  • Imports used by the handler: apiGet for HTTP GET, formatShow for response formatting, formatError for error handling, and logResponse for logging.
    import { apiDelete, apiGet, apiList, apiPost } from "../api";
    import { formatDelete, formatError, formatList, formatShow, type EduframeRecord } from "../formatters";
    import { logResponse } from "../response-logger";
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, so the description does not need to repeat safety traits. The description adds no additional behavioral context (e.g., error handling, data freshness), but for a simple read operation this is adequate.

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 a single, short sentence: 'Get one payment record'. It contains no unnecessary words and fronts the key purpose immediately.

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

Completeness3/5

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

The tool is simple (one param, no output schema) and the description is minimal. It does not explain the return value or behavior on invalid IDs, but given the low complexity and annotations, it remains adequate. However, adding return details would improve completeness.

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?

With 100% schema description coverage on the single 'id' parameter, the schema already provides clear meaning. The description adds no extra parameter semantics beyond what is in the schema, so baseline score of 3 is appropriate.

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 'Get one payment record' uses a specific verb 'get' and resource 'payment record', clearly indicating it retrieves a single payment. It distinguishes from sibling tools like 'get_payments' (not present) or other 'get_' tools by emphasizing 'one'.

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 does not mention scenarios where it should not be used, nor does it point to sibling tools like 'get_payments' for multiple records.

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/martijnpieters/eduframe-mcp'

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