add_variable
Add a non-secret variable to a Codemagic variable group to manage build configuration.
Instructions
Add a non-secret variable to a Codemagic variable group. For secret values (API keys, certificates, tokens) use the Codemagic UI instead — secrets should never pass through the agent.
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": {
"group_id": "<group_id>",
"name": "<name>",
"value": "<value>"
},
"name": "add_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_id | Yes | The variable group ID to add the variable to | |
| name | Yes | Variable name, e.g. FLUTTER_VERSION | |
| value | Yes | Variable value |