Skip to main content
Glama

domain_list

List all service and custom domains for a Railway service to view endpoints, manage configurations, and audit domain settings.

Instructions

[API] List all domains (both service and custom) for a service

⚡️ Best for: ✓ Viewing service endpoints ✓ Managing domain configurations ✓ Auditing domain settings

→ Prerequisites: service_list

→ Next steps: domain_create, domain_update

→ Related: service_info, tcp_proxy_list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the project containing the service
environmentIdYesID of the environment that the service is in to list domains from (usually obtained from service_list)
serviceIdYesID of the service to list domains for

Implementation Reference

  • The handler function that executes the 'domain_list' tool logic by calling domainService.listDomains(projectId, environmentId, serviceId).
    async ({ projectId, environmentId, serviceId }) => { return domainService.listDomains(projectId, environmentId, serviceId); }
  • Zod input schema defining parameters for the 'domain_list' tool: projectId, environmentId, serviceId.
    { projectId: z.string().describe("ID of the project containing the service"), environmentId: z.string().describe("ID of the environment that the service is in to list domains from (usually obtained from service_list)"), serviceId: z.string().describe("ID of the service to list domains for") },
  • The registerAllTools function collects tools from various modules, including domainTools (which contains 'domain_list'), and registers them with the MCP server using server.tool().
    export function registerAllTools(server: McpServer) { // Collect all tools const allTools = [ ...databaseTools, ...deploymentTools, ...domainTools, ...projectTools, ...serviceTools, ...tcpProxyTools, ...variableTools, ...configTools, ...volumeTools, ...templateTools, ] as Tool[]; // Register each tool with the server allTools.forEach((tool) => { server.tool( ...tool ); }); }
  • Export of domainTools array where the 'domain_list' tool is created and defined using createTool, making it available for registration.
    export const domainTools = [ createTool( "domain_list", formatToolDescription({ type: 'API', description: "List all domains (both service and custom) for a service", bestFor: [ "Viewing service endpoints", "Managing domain configurations", "Auditing domain settings" ], relations: { prerequisites: ["service_list"], nextSteps: ["domain_create", "domain_update"], related: ["service_info", "tcp_proxy_list"] } }), { projectId: z.string().describe("ID of the project containing the service"), environmentId: z.string().describe("ID of the environment that the service is in to list domains from (usually obtained from service_list)"), serviceId: z.string().describe("ID of the service to list domains for") }, async ({ projectId, environmentId, serviceId }) => { return domainService.listDomains(projectId, environmentId, serviceId); } ),

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