Skip to main content
Glama
hectortemich

@deonpay/mcp-server

by hectortemich

Get transaction details

deonpay_get_transaction

Fetch a single transaction's full detail by UUID, including NetPay timeline, metadata, refund info, and payer IP/user-agent for debugging or refund decisions.

Instructions

Fetch the full detail of a single transaction by UUID. Returns everything in the list view PLUS the NetPay timeline (each step in the charge / 3DS flow with duration_ms and error info), netpay charge_id / transaction_token, full metadata, refund details (when applicable), and IP/user-agent of the payer. Use this when debugging a failure, building a refund decision, or when the user asks 'what happened with transaction X'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTransaction UUID.

Implementation Reference

  • Handler for deonpay_get_transaction: makes a GET request to /transactions/{uuid} to fetch a single transaction's full details including the NetPay timeline, charge/3DS flow steps, metadata, refund details, and payer info.
    // deonpay_get_transaction
    // -------------------------------------------------------------------------
    server.registerTool(
      "deonpay_get_transaction",
      {
        title: "Get transaction details",
        description:
          "Fetch the full detail of a single transaction by UUID. Returns everything in the list view PLUS the NetPay timeline (each step in the charge / 3DS flow with duration_ms and error info), netpay charge_id / transaction_token, full metadata, refund details (when applicable), and IP/user-agent of the payer. Use this when debugging a failure, building a refund decision, or when the user asks 'what happened with transaction X'.",
        inputSchema: {
          id: z.string().uuid().describe("Transaction UUID."),
        },
      },
      safeHandler(async ({ id }) => {
        return client.get(`/transactions/${encodeURIComponent(id)}`);
      }),
    );
  • Input schema for deonpay_get_transaction: single UUID string parameter 'id' validated with Zod.
    inputSchema: {
      id: z.string().uuid().describe("Transaction UUID."),
    },
  • Registration of deonpay_get_transaction tool via server.registerTool() inside registerTransactionTools().
    server.registerTool(
      "deonpay_get_transaction",
      {
        title: "Get transaction details",
        description:
          "Fetch the full detail of a single transaction by UUID. Returns everything in the list view PLUS the NetPay timeline (each step in the charge / 3DS flow with duration_ms and error info), netpay charge_id / transaction_token, full metadata, refund details (when applicable), and IP/user-agent of the payer. Use this when debugging a failure, building a refund decision, or when the user asks 'what happened with transaction X'.",
        inputSchema: {
          id: z.string().uuid().describe("Transaction UUID."),
        },
      },
      safeHandler(async ({ id }) => {
        return client.get(`/transactions/${encodeURIComponent(id)}`);
      }),
    );
  • safeHandler wraps the tool's async handler with try/catch, converting thrown errors into MCP-shaped error results with isError=true for the LLM to react to.
    export function safeHandler<TArgs>(
      fn: (args: TArgs) => Promise<unknown>,
    ): (args: TArgs) => Promise<CallToolResult> {
      return async (args: TArgs) => {
        try {
          const value = await fn(args);
          return jsonResult(value);
        } catch (err) {
          return errorResult(err);
        }
      };
  • DeonpayClient.get() — the HTTP GET method used by the tool handler to call /transactions/{id}.
    async get<T = unknown>(path: string, query?: QueryParams): Promise<T> {
      return this.request<T>("GET", path, { query });
    }
Behavior4/5

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

No annotations exist, so the description carries full transparency burden. It details what extra fields are returned beyond the list view (NetPay timeline, charge_id, metadata, refund details, IP/user-agent). However, it does not mention error handling or potential side effects, which are minimal for a read operation.

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?

Two sentences, front-loaded with the core action, followed by a concise list of additional return data and usage scenarios. Every sentence adds value without redundancy.

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?

Given the tool has a single parameter, no output schema, and no annotations, the description provides sufficient context about what the tool returns and when to use it. Minor gaps: no mention of error responses or pagination, but not critical for this focused read 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?

There is a single parameter 'id' with UUID format and 100% schema description coverage ('Transaction UUID'). The description reinforces its purpose but adds no new semantic detail beyond what the schema already provides.

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 'Fetch the full detail of a single transaction by UUID' with a specific verb and resource. It distinguishes from list views by listing additional fields, making its purpose unambiguous and differentiating it from sibling tools like deonpay_list_transactions.

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 usage scenarios provided: 'Use this when debugging a failure, building a refund decision, or when the user asks what happened with transaction X.' This gives clear guidance on when to invoke, implicitly excluding use cases better served by list tools.

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/hectortemich/deonpay-mcp-server'

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