Skip to main content
Glama

project_info

Retrieve detailed information about a specific Railway project, including project 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
NameRequiredDescriptionDefault
projectIdYesID of the project to get information about

Implementation Reference

  • The project_info tool is registered here via createTool, including its description, input schema, and handler function.
    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);
      }
    ),
  • The core handler logic for retrieving and formatting project information, called by the tool handler.
      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)}`);
        }
      }
  • Zod input schema defining the required projectId parameter for the project_info tool.
    {
      projectId: z.string().describe("ID of the project to get information about")
    },
  • The projectTools (including project_info) are spread into allTools and registered with the MCP server via server.tool().
    allTools.forEach((tool) => {
      server.tool(
        ...tool
      );
    });
  • Singleton instance of ProjectService exported for use by tool handlers.
    export const projectService = new ProjectService();

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