Capture a single element (cropped screenshot)
capture_elementCapture a single webpage element as a cropped screenshot by CSS selector, saving a full-resolution image to disk and sending a webp thumbnail. Use it to inspect buttons, cards, or navigation without paying for a full-page capture.
Instructions
Screenshot ONE element, cropped to its bounding box — far cheaper than a full page when you only need a button, card, or nav. Navigates, applies the optional viewport, scrolls the selector's first match into view, and crops. The full-resolution crop is saved to disk; a webp thumbnail goes on the wire.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL to open, e.g. http://localhost:5173. | |
| reload | No | Reload even if the URL is already open (default reuses it, so it can be stale after an edit). | |
| selector | Yes | CSS selector for the target; first match wins. Playwright prefixes work too (text="Log in", role=button[name="Submit"]). Use "body" to scroll the page itself. | |
| viewport | No | Switch to this breakpoint first. Default: keep the current one. |