variable_set
Create or update environment variables to manage configuration values, connection strings, and service secrets on the Railway MCP server, ensuring secure and precise service setups.
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
Name | Required | Description | Default |
---|---|---|---|
environmentId | Yes | ID of the environment for the variable (usually obtained from service_list) | |
name | Yes | Name of the environment variable | |
projectId | Yes | ID of the project containing the service | |
serviceId | No | Optional: ID of the service for the variable, if omitted creates/updates a shared variable | |
value | Yes | Value to set for the variable |