get_variable
Retrieve PHP variable values during debugging sessions, supporting nested properties with PHP syntax for detailed inspection.
Instructions
Get a specific variable by name, including nested properties. Use PHP syntax for nested access (e.g., '$user->name', '$array[0]', '$obj->items[2]->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>"
},
"name": "get_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Variable name with $ prefix (e.g., '$user', '$data["key"]', '$obj->property') | |
| max_depth | No | Maximum depth for nested properties | |
| context_id | No | Context ID | |
| session_id | No | Session ID | |
| stack_depth | No | Stack frame depth |