Skip to main content
Glama

tcp_proxy_delete

Delete a TCP proxy from Railway infrastructure to remove unused proxies, manage security, and perform endpoint cleanup. Use this tool for permanent proxy removal.

Instructions

[API] Delete a TCP proxy

⚡️ Best for: ✓ Removing unused proxies ✓ Security management ✓ Endpoint cleanup

⚠️ Not for: × Temporary proxy disabling × Port updates

→ Prerequisites: tcp_proxy_list

→ Related: service_update

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyIdYesID of the TCP proxy to delete

Implementation Reference

  • The handler function that executes the tcp_proxy_delete tool logic by calling tcpProxyService.deleteTcpProxy(proxyId).
    async ({ proxyId }) => {
      return tcpProxyService.deleteTcpProxy(proxyId);
    }
  • Input schema using Zod for the tcp_proxy_delete tool, requiring a proxyId string.
    {
      proxyId: z.string().describe("ID of the TCP proxy to delete")
    },
  • Registration of the tcp_proxy_delete tool using createTool, including description, schema, and handler.
    createTool(
      "tcp_proxy_delete",
      formatToolDescription({
        type: 'API',
        description: "Delete a TCP proxy",
        bestFor: [
          "Removing unused proxies",
          "Security management",
          "Endpoint cleanup"
        ],
        notFor: [
          "Temporary proxy disabling",
          "Port updates"
        ],
        relations: {
          prerequisites: ["tcp_proxy_list"],
          related: ["service_update"]
        }
      }),
      {
        proxyId: z.string().describe("ID of the TCP proxy to delete")
      },
      async ({ proxyId }) => {
        return tcpProxyService.deleteTcpProxy(proxyId);
      }
    )
  • Helper service method deleteTcpProxy that wraps the repository call and handles responses/errors.
    async deleteTcpProxy(id: string): Promise<CallToolResult> {
      try {
        const result = await this.client.tcpProxies.tcpProxyDelete(id);
        
        if (result) {
          return createSuccessResponse({
            text: `TCP Proxy with ID ${id} deleted successfully`,
            data: { success: true }
          });
        } else {
          return createErrorResponse(`Failed to delete TCP Proxy with ID ${id}`);
        }
      } catch (error) {
        return createErrorResponse(`Error deleting TCP proxy: ${formatError(error)}`);
      }
    }
  • Repository helper that executes the GraphQL mutation to delete the TCP proxy.
    async tcpProxyDelete(id: string): Promise<boolean> {
      const query = `
        mutation tcpProxyDelete($id: String!) {
          tcpProxyDelete(id: $id)
        }
      `;
    
      const variables = { id };
      const response = await this.client.request<{ tcpProxyDelete: boolean }>(query, variables);
      return response.tcpProxyDelete;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

No annotations provided, so description carries burden. Indicates permanent deletion via 'Not for: Temporary proxy disabling', but lacks details on reversibility, cascading effects, or confirmation. Still sufficient.

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?

Description is concise with bullet points and emojis, front-loads purpose, and uses clear sections. Every sentence adds value.

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

Completeness5/5

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

Given one required parameter, no output schema, and straightforward behavior, the description covers key aspects: purpose, usage guidelines, prerequisites, and related tool.

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?

Schema description coverage is 100% and already describes proxyId as 'ID of the TCP proxy to delete'. Description adds no extra semantics beyond that. Baseline 3 applies.

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 'Delete a TCP proxy' with specific verb and resource. Best for section reinforces purpose and distinguishes from siblings like tcp_proxy_create and tcp_proxy_list.

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 lists when to use (Removing unused proxies, Security management, Endpoint cleanup) and when not (Temporary proxy disabling, Port updates). Also mentions prerequisites (tcp_proxy_list) and related tool (service_update).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.