Skip to main content
Glama

variable_copy

Copy environment variables between environments in Railway projects for migration, configuration sharing, or duplication. Supports overwrite option and handles shared or service-specific variables.

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

Input Schema

NameRequiredDescriptionDefault
overwriteNoWhether to overwrite existing variables in the target environment
projectIdYesID of the project
serviceIdNoID of the service (optional, if omitted copies shared variables)
sourceEnvironmentIdYesID of the source environment (usually obtained from project_info)
targetEnvironmentIdYesID of the target environment (usually obtained from project_info)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "overwrite": { "default": false, "description": "Whether to overwrite existing variables in the target environment", "type": "boolean" }, "projectId": { "description": "ID of the project", "type": "string" }, "serviceId": { "description": "ID of the service (optional, if omitted copies shared variables)", "type": "string" }, "sourceEnvironmentId": { "description": "ID of the source environment (usually obtained from project_info)", "type": "string" }, "targetEnvironmentId": { "description": "ID of the target environment (usually obtained from project_info)", "type": "string" } }, "required": [ "projectId", "sourceEnvironmentId", "targetEnvironmentId" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jason-tan-swe/railway-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server