set_variable
Modify PHP variable values during debugging sessions to test different scenarios and fix issues in real-time.
Instructions
Set the value of a variable in the current scope
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": "set_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Variable name (e.g., $x, $user->name) | |
| value | Yes | New value as a PHP literal (e.g., 42, "hello", true, null) | |
| context_id | No | Context ID | |
| session_id | No | Session ID | |
| stack_depth | No | Stack frame depth |