project_info
Retrieve detailed information about a specific Railway project, including its status, environments, services, and configuration settings.
Instructions
[API] Get detailed information about a specific Railway project
⚡️ Best for: ✓ Viewing project details and status ✓ Checking environments and services ✓ Project configuration review
→ Prerequisites: project_list
→ Next steps: service_list, variable_list
→ Related: project_update, project_delete
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ID of the project to get information about |
Implementation Reference
- src/tools/project.tool.ts:46-48 (handler)The handler function for the 'project_info' tool that calls the project service to retrieve project details.async ({ projectId }) => { return projectService.getProject(projectId); }
- src/tools/project.tool.ts:43-45 (schema)Zod input schema defining the required 'projectId' parameter for the tool.{ projectId: z.string().describe("ID of the project to get information about") },
- src/tools/project.tool.ts:27-49 (registration)The 'project_info' tool is created using createTool and included in the exported projectTools array.createTool( "project_info", formatToolDescription({ type: 'API', description: "Get detailed information about a specific Railway project", bestFor: [ "Viewing project details and status", "Checking environments and services", "Project configuration review" ], relations: { prerequisites: ["project_list"], nextSteps: ["service_list", "variable_list"], related: ["project_update", "project_delete"] } }), { projectId: z.string().describe("ID of the project to get information about") }, async ({ projectId }) => { return projectService.getProject(projectId); } ),
- src/tools/index.ts:16-37 (registration)All tools, including those from projectTools (which contains project_info), are registered 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 ); }); }
- The projectService.getProject method that fetches and formats project information from the Railway API client.async getProject(projectId: string): Promise<CallToolResult> { try { const project = await this.client.projects.getProject(projectId); if (!project) { return createErrorResponse("Project not found."); } const environments = project.environments?.edges?.map(edge => edge.node) || []; const services = project.services?.edges?.map(edge => edge.node) || []; const environmentList = environments.map(env => ` 🌍 ${env.name} (ID: ${env.id})` ).join('\n'); const serviceList = services.map(svc => ` 🚀 ${svc.name} (ID: ${svc.id})` ).join('\n'); const info = `📁 Project: ${project.name} (ID: ${project.id}) Description: ${project.description || 'No description'} Created: ${new Date(project.createdAt).toLocaleString()} Subscription: ${project.subscriptionType || 'Free'} Environments: ${environmentList || ' No environments'} Services: ${serviceList || ' No services'}`; return createSuccessResponse({ text: info, data: { project, environments, services } }); } catch (error) { return createErrorResponse(`Error getting project details: ${formatError(error)}`); } }