railway-mcp

by jason-tan-swe
Verified

variable_set

[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

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

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "environmentId": { "description": "ID of the environment for the variable (usually obtained from service_list)", "type": "string" }, "name": { "description": "Name of the environment variable", "type": "string" }, "projectId": { "description": "ID of the project containing the service", "type": "string" }, "serviceId": { "description": "Optional: ID of the service for the variable, if omitted creates/updates a shared variable", "type": "string" }, "value": { "description": "Value to set for the variable", "type": "string" } }, "required": [ "projectId", "environmentId", "name", "value" ], "type": "object" }