write_variable
Write a value to a C/C++ variable on a halted target. Specify the variable name and value as integer, float, or string to modify program state during debugging.
Instructions
Write a value to a C/C++ variable on the target.
The target must be halted (stopped) for variable writes to work.
Args: name: Variable name as it appears in source code value: Value to write (integer, float, or string representation)
Returns: Confirmation with the new value
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": {
"name": "<name>",
"value": "<value>"
},
"name": "write_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |