variable_delete
Delete environment variables from Railway services to remove unused configurations and maintain security. This tool permanently removes specified variables from project environments.
Instructions
[API] Delete a variable for a service in a specific environment
⚡️ Best for: ✓ Removing unused configuration ✓ Security cleanup ✓ Configuration management
⚠️ Not for: × Temporary variable disabling × Bulk variable removal
→ Prerequisites: service_list
→ Next steps: deployment_trigger, service_restart
→ Related: variable_list, variable_set
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>",
"name": "<name>"
},
"name": "variable_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ID of the project | |
| environmentId | Yes | ID of the environment to delete the variable from (usually obtained from service_list) | |
| name | Yes | Name of the variable to delete | |
| serviceId | No | ID of the service (optional, if omitted deletes a shared variable) |