take_screenshot
Capture screenshots of web pages or specific elements using CSS/XPath selectors. Capture full pages, viewports, or targeted elements with configurable dimensions and quality settings.
Instructions
Take screenshot with structured result, it will take screenshot of the target element if target is not None, otherwise it will take screenshot of the full page, otherwise it will take screenshot of the current viewport Screenshot page or element (by target selector, supports CSS/XPath, e.g. 'button', '//button', 'css=button', 'xpath=//button'). See: https://playwright.dev/python/docs/locators#locate-by-css-or-xpath
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": {
"session_id": "<session_id>"
},
"name": "take_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| target | No | ||
| width | No | ||
| height | No | ||
| full_page | No | ||
| quality | No | ||
| format | No | png |