comet_evaluate
Evaluates JavaScript expressions on the current Comet page to run DOM queries, extract data, or manipulate pages when other browser tools do not cover the task.
Instructions
Evaluate a JavaScript expression in the current Comet page.
Powerful but use with care — string results are sanitized for injection detection. Use for DOM queries, data extraction, or page manipulation that other tools don't cover.
Args: expression: JavaScript expression to evaluate (e.g. 'document.title').
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": "comet_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |