Skip to main content
Glama

tcp_proxy_list

View and manage TCP proxy configurations for Railway services to control external access and audit network endpoints in specific environments.

Instructions

[API] List all TCP proxies for a service in a specific environment

⚡️ Best for: ✓ Viewing TCP proxy configurations ✓ Managing external access ✓ Auditing service endpoints

→ Prerequisites: service_list

→ Next steps: tcp_proxy_create

→ Related: domain_list, service_info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentIdYesID of the environment containing the service
serviceIdYesID of the service to list TCP proxies for

Implementation Reference

  • Definition and registration preparation of the 'tcp_proxy_list' tool using createTool. Includes tool name, formatted description, input schema with environmentId and serviceId, and handler function that calls the service method.
    createTool( "tcp_proxy_list", formatToolDescription({ type: 'API', description: "List all TCP proxies for a service in a specific environment", bestFor: [ "Viewing TCP proxy configurations", "Managing external access", "Auditing service endpoints" ], relations: { prerequisites: ["service_list"], nextSteps: ["tcp_proxy_create"], related: ["domain_list", "service_info"] } }), { environmentId: z.string().describe("ID of the environment containing the service"), serviceId: z.string().describe("ID of the service to list TCP proxies for") }, async ({ environmentId, serviceId }) => { return tcpProxyService.listTcpProxies(environmentId, serviceId); } ),
  • The handler function for the tcp_proxy_list tool, which invokes tcpProxyService.listTcpProxies with the provided environmentId and serviceId.
    async ({ environmentId, serviceId }) => { return tcpProxyService.listTcpProxies(environmentId, serviceId); }
  • Zod schema defining the input parameters for the tcp_proxy_list tool: environmentId (string) and serviceId (string).
    { environmentId: z.string().describe("ID of the environment containing the service"), serviceId: z.string().describe("ID of the service to list TCP proxies for") },
  • Registration of all tools, including tcp_proxy_list from tcpProxyTools, by spreading into server.tool calls on the MCP server.
    allTools.forEach((tool) => { server.tool( ...tool ); });
  • Helper method in TcpProxyService that implements the core logic for listing TCP proxies: fetches from client, formats response with details or empty message, handles errors.
    async listTcpProxies(environmentId: string, serviceId: string): Promise<CallToolResult> { try { const proxies = await this.client.tcpProxies.listTcpProxies(environmentId, serviceId); if (proxies.length === 0) { return createSuccessResponse({ text: 'No TCP proxies found for this service.', data: [] }); } const proxyDetails = proxies.map(proxy => `- Application Port: ${proxy.applicationPort} → Proxy Port: ${proxy.proxyPort} Domain: ${proxy.domain} ID: ${proxy.id}` ).join('\n\n'); return createSuccessResponse({ text: `TCP Proxies for this service:\n\n${proxyDetails}`, data: proxies }); } catch (error) { return createErrorResponse(`Error listing TCP proxies: ${formatError(error)}`); } }

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/epitaphe360/railway-mcp'

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