set_variables
Set environment variables for a Railway service using project, environment, and service IDs, with key-value pairs as JSON. Upserts by adding or updating variables.
Instructions
Set one or more environment variables (upsert)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"environmentId": "<environmentId>",
"serviceId": "<serviceId>",
"variables": "<variables>"
},
"name": "set_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | The project ID | |
| serviceId | Yes | The service ID | |
| variables | Yes | JSON object of key-value pairs, e.g. {"PORT":"3000","NODE_ENV":"production"} | |
| environmentId | Yes | The environment ID |