Skip to main content
Glama

variable_set

Create or update environment variables in Railway.app services to configure applications, manage secrets, and set connection strings for deployments.

Instructions

[API] Create or update an environment variable

⚡️ Best for: ✓ Setting configuration values ✓ Updating connection strings ✓ Managing service secrets

⚠️ Not for: × Bulk variable updates (use variable_bulk_set) × Temporary configuration changes

→ Prerequisites: service_list

→ Alternatives: variable_bulk_set

→ Next steps: deployment_trigger, service_restart

→ Related: variable_list, variable_delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the project containing the service
environmentIdYesID of the environment for the variable (usually obtained from service_list)
nameYesName of the environment variable
valueYesValue to set for the variable
serviceIdNoOptional: ID of the service for the variable, if omitted creates/updates a shared variable

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