Skip to main content
Glama

get_gateway

Retrieve a specific payment gateway by its unique ID. Access detailed gateway information for your company's billing operations.

Instructions

Get a company gateway by ID. GET /gateways/{gatewayId}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gatewayIdYesGateway ID (required)

Implementation Reference

  • Handler function that parses input args (validates gatewayId with Zod schema) and calls gatewayService.getGateway(client, gatewayId) to fetch a gateway by ID.
    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(() =>
        gatewayService.getGateway(client, parsed.data.gatewayId)
      );
    }
  • Zod schema defining the input: a required 'gatewayId' string (min length 1).
    const schema = z.object({
      gatewayId: z.string().min(1, "gatewayId is required"),
    });
  • Tool definition with name 'get_gateway', description, and JSON Schema input (gatewayId required string).
    const definition = {
      name: "get_gateway",
      description: "Get a company gateway by ID. GET /gateways/{gatewayId}.",
      inputSchema: {
        type: "object" as const,
        properties: {
          gatewayId: { type: "string", description: "Gateway ID (required)" },
        },
        required: ["gatewayId"],
      },
    };
  • Registration in registerGatewayTools() which collects all gateway tools including getGatewayTool.
    /** All gateway tools. */
    export function registerGatewayTools(): Tool[] {
      return [
        listGlobalGatewaysTool,
        listGatewaysTool,
        getGatewayTool,
        getClientTokenTool,
        createSetupIntentTool,
        createGatewayTool,
        updateGatewayTool,
        deleteGatewayTool,
        testGatewayTool,
      ];
    }
  • Service function that makes the actual API call: client.get('/gateways/{gatewayId}').
    /** GET /gateways/{gatewayId} */
    export async function getGateway(
      client: Client,
      gatewayId: string
    ): Promise<unknown> {
      return client.get<unknown>(`/gateways/${gatewayId}`);
    }
Behavior3/5

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

No annotations are provided, so the description bears full burden. It implies a read operation via 'GET', but does not disclose any side effects or auth requirements. Minimal but adequate for a simple retrieval.

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 concise sentences with no wasted words. Information is front-loaded and efficient.

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?

While the tool is simple, the description lacks details about the returned object format. With no output schema, a hint about the response would enhance completeness, but it is not critically incomplete.

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 single required parameter gatewayId is described in the schema with full coverage. The description adds no extra meaning beyond 'by ID', so baseline 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 states 'Get a company gateway by ID' with the HTTP method, clearly indicating the action and resource. It distinguishes from siblings like create_gateway, delete_gateway, and list_gateways.

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?

No guidance is given on when to use this tool vs alternatives like list_gateways. The description only states the operation without context for 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/rhinosaas/rebillia-mcp-server'

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