Skip to main content
Glama
railwayapp

Railway MCP Server

Official
by railwayapp

Check Railway CLI Status

check-railway-status

Verify Railway CLI installation and login status to ensure proper setup before using Railway cloud platform tools.

Instructions

Check whether the Railway CLI is installed and if the user is logged in. This tool helps agents verify the Railway CLI setup before attempting to use other Railway tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'check-railway-status' tool. It checks the Railway CLI status by calling checkRailwayCliStatus() and returns a formatted text response indicating success or failure with instructions.
    handler: async () => {
    	try {
    		await checkRailwayCliStatus();
    		return createToolResponse(
    			"✅ Railway CLI Status Check Passed\n\n" +
    				"• Railway CLI is installed and accessible\n" +
    				"• User is authenticated and logged in\n\n" +
    				"You can now use other Railway tools to manage your projects.",
    		);
    	} catch (error: unknown) {
    		const errorMessage =
    			error instanceof Error ? error.message : "Unknown error occurred";
    		return createToolResponse(
    			"❌ Railway CLI Status Check Failed\n\n" +
    				`**Error:** ${errorMessage}\n\n` +
    				"**Next Steps:**\n" +
    				"• If Railway CLI is not installed: Install it from https://docs.railway.com/guides/cli\n" +
    				"• If not logged in: Run `railway login` to authenticate\n" +
    				"• If token is expired: Run `railway login` to refresh your authentication",
    		);
    	}
    },
  • src/index.ts:21-31 (registration)
    Registers all tools from './tools/index.ts' (including 'checkRailwayStatusTool' renamed by its .name property 'check-railway-status') into the MCP server.
    Object.values(tools).forEach((tool) => {
    	server.registerTool(
    		tool.name,
    		{
    			title: tool.title,
    			description: tool.description,
    			inputSchema: tool.inputSchema,
    		},
    		tool.handler,
    	);
    });
  • Helper function that verifies Railway CLI installation and authentication by running 'railway --version' and 'railway whoami' commands.
    export const checkRailwayCliStatus = async (): Promise<void> => {
      try {
        await runRailwayCommand("railway --version");
        await runRailwayCommand("railway whoami");
      } catch (error: unknown) {
        return analyzeRailwayError(error, "railway whoami");
      }
    };
  • Utility function to create a standardized text response object for MCP tools.
    export const createToolResponse = (text: string) => ({
    	content: [{ type: "text" as const, text }],
    });
Behavior3/5

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

With no annotations provided, the description carries full burden. It describes what the tool checks (installation and login status) but doesn't disclose behavioral details like what specific checks are performed, what happens if CLI isn't found, whether it provides diagnostic information, or what the output format looks like. It's adequate but lacks depth.

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?

Two concise sentences with zero waste. The first sentence states the purpose, the second provides usage context. Every word earns its place, and the information is front-loaded with the core functionality stated immediately.

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 zero-parameter verification tool with no output schema, the description is reasonably complete. It explains what's being checked and when to use it. However, without annotations or output schema, it could benefit from mentioning what kind of status information is returned (e.g., binary success/failure vs detailed diagnostics).

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

Parameters4/5

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

The tool has zero parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and it correctly focuses on the tool's purpose rather than attempting to describe non-existent inputs.

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 the tool's purpose with specific verbs ('check whether... installed' and 'logged in') and identifies the resource (Railway CLI). It distinguishes this verification tool from sibling deployment/management tools by focusing on setup status rather than operational actions.

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?

The description explicitly states when to use this tool: 'before attempting to use other Railway tools.' This provides clear contextual guidance about its role as a prerequisite check, distinguishing it from all sibling tools that perform actual Railway operations.

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/railwayapp/railway-mcp-server'

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