Skip to main content
Glama

project_info

Retrieve detailed information about a specific Railway project, including its status, environments, services, and configuration.

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 getProject method in ProjectService is the actual handler that executes the tool logic. It fetches project details from the Railway API, formats environments/services info, and returns a success response with formatted text and raw data.
      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)}`);
        }
      }
  • The input schema for project_info: requires a 'projectId' string parameter describing the project ID to get information about.
      projectId: z.string().describe("ID of the project to get information about")
    },
  • The tool registration for 'project_info' using createTool with the name, formatted description, Zod schema, and async handler that calls projectService.getProject().
    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 registerAllTools function iterates all tools (including projectTools) and registers them with the MCP server via 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
        );
      });
    } 
  • The formatToolDescription helper used to generate the human-readable description string for the tool, including type, best for, relations (prerequisites, next steps, related).
    export const formatToolDescription = ({
      type,
      description,
      bestFor = [],
      notFor = [],
      relations = {},
    }: {
      type: ToolType;
      description: string;
      bestFor?: string[];
      notFor?: string[];
      relations?: ToolRelations;
    }) => {
      const sections = [
        `[${type}] ${description}`,
        
        // Best For section
        bestFor.length > 0 && [
          '⚡️ Best for:',
          ...bestFor.map(b => `  ✓ ${b}`)
        ].join('\n'),
        
        // Not For section
        notFor.length > 0 && [
          '⚠️ Not for:',
          ...notFor.map(n => `  × ${n}`)
        ].join('\n'),
        
        // Prerequisites section
        relations?.prerequisites?.length! > 0 &&
          `→ Prerequisites: ${relations?.prerequisites?.join(', ')}`,
        
        // Alternatives section
        relations?.alternatives?.length! > 0 &&
          `→ Alternatives: ${relations?.alternatives?.join(', ')}`,
        
        // Next Steps section
        relations?.nextSteps?.length! > 0 &&
          `→ Next steps: ${relations?.nextSteps?.join(', ')}`,
        
        // Related section
        relations?.related?.length! > 0 &&
          `→ Related: ${relations?.related?.join(', ')}`
      ];
    
      // Filter out falsy values and join with newlines
      return sections.filter(Boolean).join('\n\n');
    };
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must convey behavioral traits. The word 'get' and the listed best uses (all read operations) strongly imply a non-destructive, read-only operation. However, it does not explicitly state 'read-only' or mention potential pitfalls like authentication or missing project, but for a simple get tool this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a one-line purpose followed by bullet points for best uses, prerequisites, next steps, and related tools. Every sentence provides value with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple retrieval tool with one parameter and no output schema, the description covers purpose, usage context, dependencies, and related tools. It gives a good sense of what is returned ('detailed information', 'environments and services', 'project configuration review'). Could be more explicit about error conditions, but overall sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does not add any extra meaning for the parameter beyond what the schema provides. It mentions project_list as a prerequisite, which indirectly helps but is not parameter-specific.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get detailed information about a specific Railway project' with a strong verb and resource. It lists specific best uses (viewing project details, checking environments/services, project configuration review) that distinguish it from sibling tools like project_update or project_delete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly lists prerequisites (project_list), next steps (service_list, variable_list), and related tools (project_update, project_delete). This provides clear when-to-use and when-not-to-use guidance, fully meeting the dimension criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/jason-tan-swe/railway-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server