peek
Open a live camera preview to position an item, then capture a photo on keypress, returning the image and saved file path.
Instructions
Open a live camera preview so the user can position an item, then wait for them to press space to take the photo (or Escape to cancel).
Returns the photo as an image plus the path where it was saved.
Call this when you need to see a physical object, document, or scene.
Args:
max_side: longest edge in pixels for the returned image (default 1500).
device: camera index if the user has more than one (default 0).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | ||
| max_side | No |