evaluate_file
Runs a JavaScript file from an absolute path inside a Chrome tab, returning the final expression value or error and optionally saving output to a file.
Instructions
Evaluate a JavaScript file in a Chrome tab — evaluate for big scripts.
path must be absolute (~ is expanded) and names a UTF-8 file on the
machine running this server, not the one running Chrome. Its contents run
exactly as an evaluate expression: the value of the last statement is
returned, promises are awaited (30 s limit), and stack traces of a JS
exception name the file. Returns {"tab_id", "value", "type"} or
{"error": ...}. output_path saves the value to a file instead,
exactly as in evaluate.
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": {
"path": "<path>",
"tab_id": "<tab_id>"
},
"name": "evaluate_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| tab_id | Yes | ||
| output_path | No |