domain_list
Retrieve and manage service and custom domain configurations using the domain_list tool on railway-mcp. Ideal for auditing, viewing endpoints, and updating domain settings efficiently.
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
| Name | Required | Description | Default |
|---|---|---|---|
| environmentId | Yes | ID of the environment that the service is in to list domains from (usually obtained from service_list) | |
| projectId | Yes | ID of the project containing the service | |
| serviceId | Yes | ID of the service to list domains for |
Implementation Reference
- src/tools/domain.tool.ts:27-29 (handler)The handler function that implements the core logic of the 'domain_list' tool by calling domainService.listDomains with the required parameters.async ({ projectId, environmentId, serviceId }) => { return domainService.listDomains(projectId, environmentId, serviceId); }
- src/tools/domain.tool.ts:22-26 (schema)Zod schema defining the input parameters for the 'domain_list' tool: projectId, environmentId, and 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") },
- src/tools/domain.tool.ts:6-30 (registration)The 'domain_list' tool is created and registered in the domainTools array using createTool, defining its name, description, input schema, and handler.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); } ),
- src/tools/index.ts:16-37 (registration)Global registration of all tools, including 'domain_list' from domainTools, to 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 ); }); }