Skip to main content
Glama

configure_api_token

Set up or update the Railway API token for authentication when not configured in environment variables. This tool handles initial setup and token management for accessing Railway infrastructure.

Instructions

[UTILITY] Configure the Railway API token for authentication (only needed if not set in environment variables)

⚡️ Best for: ✓ Initial setup ✓ Token updates ✓ Authentication configuration

⚠️ Not for: × Project configuration × Service settings × Environment variables

→ Next steps: project_list, service_list

→ Related: project_create

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesRailway API token (create one at https://railway.app/account/tokens)

Implementation Reference

  • The main handler function for the 'configure_api_token' tool. It sets the Railway API token using railwayClient.setToken(token) and returns a success or error message in a structured format.
    async ({ token }) => { try { await railwayClient.setToken(token); return { content: [ { type: "text" as const, text: `✅ Successfully connected to Railway API`, }, ], }; } catch (error) { return { isError: true, content: [ { type: "text" as const, text: `❌ Failed to connect to Railway API: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } }
  • Input schema using Zod, defining a single 'token' parameter of type string with description.
    { token: z.string().describe("Railway API token (create one at https://railway.app/account/tokens)") },
  • The createTool call that registers the 'configure_api_token' tool, providing name, formatted description, input schema, and handler function.
    createTool( "configure_api_token", formatToolDescription({ type: 'UTILITY', description: "Configure the Railway API token for authentication (only needed if not set in environment variables)", bestFor: [ "Initial setup", "Token updates", "Authentication configuration" ], notFor: [ "Project configuration", "Service settings", "Environment variables" ], relations: { nextSteps: ["project_list", "service_list"], related: ["project_create"] } }), { token: z.string().describe("Railway API token (create one at https://railway.app/account/tokens)") }, async ({ token }) => { try { await railwayClient.setToken(token); return { content: [ { type: "text" as const, text: `✅ Successfully connected to Railway API`, }, ], }; } catch (error) { return { isError: true, content: [ { type: "text" as const, text: `❌ Failed to connect to Railway API: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } } )

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