capture-screenshot
Capture a screenshot of the current page or a specific CSS element. Optionally navigate to a URL before capturing. Returns a resource URI for the screenshot, with optional base64 encoding when enabled.
Instructions
Captures a screenshot of the current page or a specific element. Stores the screenshot in the MCP resource system and returns a resource URI. If ENABLE_BASE64 environment variable is set to 'true', also includes base64 encoded image in the response.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "capture-screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | No | CSS selector to capture (captures full page if not provided) | |
| url | No | URL to navigate to before capturing screenshot. Do not provide if you want to capture the current page. | |
| contextId | No | Browser ID to capture from (uses most recent browser if not provided) |