Skip to main content
Glama

void_transaction

Void a transaction before settlement to cancel it. Use refund for settled transactions.

Instructions

Void a transaction. POST /transactions/{transactionId}/void. Only works before settlement; after settlement use refund_transaction instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesTransaction ID (required). Void only works before settlement; after settlement use refund_transaction.

Implementation Reference

  • Handler function that validates the transactionId input and calls transactionService.voidTransaction to POST to /transactions/{transactionId}/void.
    async function handler(client: Client, args: Record<string, unknown> | undefined) {
      const parsed = schema.safeParse(args);
      if (!parsed.success) {
        return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
      }
      return handleToolCall(() =>
        transactionService.voidTransaction(client, parsed.data.transactionId)
      );
    }
  • Zod schema defining the input: a required transactionId string.
    const schema = z.object({
      transactionId: z.string().min(1, "transactionId is required"),
    });
  • Registration function that includes voidTransactionTool in the list of transaction tools.
    export function registerTransactionTools(): Tool[] {
      return [
        listTransactionsTool,
        getTransactionTool,
        refundTransactionTool,
        voidTransactionTool,
      ];
    }
  • Exports the Tool object with the definition (name, description, inputSchema) and handler.
    export const voidTransactionTool: Tool = {
      definition,
      handler,
    };
  • Service function that makes the HTTP POST call to /transactions/{transactionId}/void.
    export async function voidTransaction(
      client: Client,
      transactionId: string
    ): Promise<unknown> {
      return client.post<unknown>(`/transactions/${transactionId}/void`, {});
    }
Behavior4/5

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

Discloses the key behavioral constraint (only works before settlement) but does not elaborate on effects like transaction status changes or authorization requirements. Still, it is adequate for a simple action.

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 short sentences, no filler, front-loaded with the core action and key condition.

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?

Covers the essential points for a simple one-parameter tool: what it does, when it works, and the alternative. Could mention return value, but not critical given no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the parameter at 100% coverage, but the description adds the endpoint URL (POST /transactions/{transactionId}/void) which provides context 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?

Description clearly states 'Void a transaction' with a specific verb and resource, and distinguishes from the sibling 'refund_transaction' by noting the settlement condition.

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?

Explicitly says when to use ('only works before settlement') and when not to, providing the alternative 'refund_transaction' for after settlement.

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/rhinosaas/rebillia-mcp-server'

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