deployment_status
Check the current status of a deployment to monitor progress, verify successful completion, or identify failures in Railway infrastructure.
Instructions
[API] Check the current status of a deployment
⚡️ Best for: ✓ Monitoring deployment progress ✓ Verifying successful deployments ✓ Checking for deployment failures
⚠️ Not for: × Service runtime logs × Database logs
→ Prerequisites: deployment_list, deployment_trigger
→ Next steps: deployment_logs
→ Related: service_info, service_restart, deployment_wait
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deploymentId | Yes | ID of the deployment to check status for |
Implementation Reference
- src/tools/deployment.tool.ts:95-120 (handler)Full tool definition for 'deployment_status', including input schema, description, and handler function that delegates to deploymentService.healthCheckDeployment(deploymentId). This is the core implementation of the MCP tool."deployment_status", formatToolDescription({ type: 'API', description: "Check the current status of a deployment", bestFor: [ "Monitoring deployment progress", "Verifying successful deployments", "Checking for deployment failures" ], notFor: [ "Service runtime logs", "Database logs" ], relations: { prerequisites: ["deployment_list", "deployment_trigger"], nextSteps: ["deployment_logs"], related: ["service_info", "service_restart", "deployment_wait"] } }), { deploymentId: z.string().describe("ID of the deployment to check status for") }, async ({ deploymentId }) => { return deploymentService.healthCheckDeployment(deploymentId); } )
- Supporting service method called by the tool handler, performs the actual health check with delay and response formatting.async healthCheckDeployment(deploymentId: string) { try { // Wait for 5 seconds before checking status // Seems like the LLMs like to call this function multiple times in combination // with the health check function, so we need to wait a bit await new Promise(resolve => setTimeout(resolve, 5000)); const status = await this.client.deployments.healthCheckDeployment(deploymentId); const emoji = getStatusEmoji(status); return createSuccessResponse({ text: `Deployment Status: ${emoji} ${status}`, data: { status } }); } catch (error) { return createErrorResponse(`Error checking deployment health: ${formatError(error)}`); } }
- src/tools/index.ts:16-36 (registration)Registers all tools including 'deployment_status' (via ...deploymentTools) with the MCP server.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 ); });
- src/index.ts:6-20 (registration)Top-level call to registerAllTools, which includes the deployment_status tool.import { registerAllTools } from "@/tools/index.js"; // Get token from command line if provided const cliToken = process.argv[2]; if (cliToken) { process.env.RAILWAY_API_TOKEN = cliToken; } const server = new McpServer({ name: "railway-mcp", version: "1.0.0", }); // Register all tool modules registerAllTools(server);