variable_copy
Copy environment variables between environments in Railway projects to migrate configurations, share settings, or duplicate setups.
Instructions
[WORKFLOW] Copy variables from one environment to another
⚡️ Best for: ✓ Environment migration ✓ Configuration sharing ✓ Environment duplication
⚠️ Not for: × Single variable updates (use variable_set) × Temporary configuration changes
→ Prerequisites: service_list
→ Alternatives: variable_set
→ Next steps: deployment_trigger, service_restart
→ Related: variable_list, service_update
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>",
"sourceEnvironmentId": "<sourceEnvironmentId>",
"targetEnvironmentId": "<targetEnvironmentId>"
},
"name": "variable_copy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ID of the project | |
| sourceEnvironmentId | Yes | ID of the source environment (usually obtained from project_info) | |
| targetEnvironmentId | Yes | ID of the target environment (usually obtained from project_info) | |
| serviceId | No | ID of the service (optional, if omitted copies shared variables) | |
| overwrite | No | Whether to overwrite existing variables in the target environment |