eval_python
Execute Python code within a live PySide6 app to inspect widgets, call methods, and debug issues directly.
Instructions
Evaluate a Python expression or execute a statement inside the app process. Context provides:
app: QApplication instance
widgets: dict mapping widget_id → QWidget Examples: eval_python("app.activeWindow().windowTitle()") eval_python("widgets['3'].isEnabled()") eval_python("list(app.allWidgets())") WARNING: runs arbitrary code in the app — use only for debugging.
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": {
"code": "<code>"
},
"name": "eval_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |