Evaluate JavaScript in Page
gpm_browser_evaluateExecute JavaScript in the current browser page and return the result as JSON, optionally targeting a specific GPM profile connected via CDP.
Instructions
Chạy đoạn mã JavaScript trong ngữ cảnh trang hiện tại và trả về giá trị JSON.
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": "gpm_browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | Biểu thức JS hoặc hàm dạng "() => document.title" hoặc "document.querySelectorAll('a').length" | |
| profile_id | No | ID của profile GPM đang kết nối CDP (có thể bỏ trống nếu chỉ có 1 profile đang kết nối) |