Skip to main content
Glama

delete_gateway

Delete a payment gateway for your company. Fails if the gateway is linked to any currencies or customers.

Instructions

Delete a company gateway. DELETE /gateways/{gatewayId}. Fails if gateway is linked to company currencies or customers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gatewayIdYesGateway ID (required)

Implementation Reference

  • The handler function that executes the delete_gateway tool logic. Parses input using Zod schema, then calls gatewayService.deleteGateway(client, gatewayId).
    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.deleteGateway(client, parsed.data.gatewayId)
      );
    }
  • Zod schema for delete_gateway input: requires a gatewayId (string, min 1 char).
    const schema = z.object({
      gatewayId: z.string().min(1, "gatewayId is required"),
    });
  • Tool definition object with name 'delete_gateway', description, and JSON Schema input schema.
    const definition = {
      name: "delete_gateway",
      description:
        "Delete a company gateway. DELETE /gateways/{gatewayId}. Fails if gateway is linked to company currencies or customers.",
      inputSchema: {
        type: "object" as const,
        properties: {
          gatewayId: { type: "string", description: "Gateway ID (required)" },
        },
        required: ["gatewayId"],
      },
    };
  • The actual HTTP call: client.delete() to /gateways/{gatewayId}.
    export async function deleteGateway(
      client: Client,
      gatewayId: string
    ): Promise<unknown> {
      return client.delete<unknown>(`/gateways/${gatewayId}`);
    }
  • Import of deleteGatewayTool in the gateway tools index file.
    import { deleteGatewayTool } from "./deleteGateway.js";
Behavior3/5

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

With no annotations, the description must disclose behavior. It states the action (delete) and a failure condition (if linked), but does not mention side effects, permissions, or whether deletion is reversible. This is adequate but minimal for a delete 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?

The description is two sentences long, front-loaded with the action, and every word adds value. No fluff or repetition.

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?

For a simple delete tool with one parameter and no output schema, the description covers the purpose and a key failure condition. It does not explain return values, but given the tool's simplicity, it is mostly complete.

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 only one required parameter (gatewayId) with 100% schema description coverage. The tool description does not add any additional meaning beyond what the schema provides, so a 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 clearly states the action (Delete), resource (company gateway), and includes a specific condition (fails if linked to currencies or customers), distinguishing it from sibling tools like create_gateway or 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 Guidelines4/5

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

The description provides a clear precondition: don't use this tool if the gateway is linked to currencies or customers, as it will fail. This guides when to avoid using it, though it doesn't explicitly mention alternatives or scenarios for use.

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