evaluate_js
Evaluate JavaScript expressions in a live Odoo page to access the web client environment and inspector for UI automation and debugging. Requires ODOO_MCP_ALLOW_JS=1.
Instructions
Escape hatch: evaluate a JavaScript expression in the Odoo page (async allowed; env = the web client env,
__mcp = the injected inspector). Disabled unless ODOO_MCP_ALLOW_JS=1. Result truncated at 20 kB.
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": {
"expression": "<expression>"
},
"name": "evaluate_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |