agent-cam-mcp
v0.1.1Physical camera perception, measurement, and verification tool for MCP AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_status
Use this any time you need to see the physical hardware: while debugging, after reboots, during serial output, mid-process. Do not wait until the end of a task. Returns daemon version, uptime, camera states, pause flag, buffer fill, adapters, and system warnings. Always call this first.
list_cameras
List all detected physical USB webcams and IP cameras with their ID, name, resolution, fps, and state.
| Parameter | Type | Description |
|---|---|---|
refresh | boolean | If true, rescans USB bus and PNP devices for newly plugged cameras. |
capture_image
Use this any time you need to visually inspect the hardware. Captures a live frame directly as an MCP image result. Never saves to disk by default. Can crop to a defined region and annotate existing regions.
| Parameter | Type | Description |
|---|---|---|
annotate | boolean | If true, draws bounding boxes and labels for all defined regions |
camera | string | Camera ID (default: primary camera) |
format | string | Image format (default jpeg) |
region | string | Optional named region to crop to |
width | integer | Target image width (default 1024, max 3840) |
capture_sequence
Captures a sequence of frames over time and returns a single token-efficient contact sheet with timestamps. Use to observe physical motions, LED blink patterns, or mechanical movements.
| Parameter | Type | Description |
|---|---|---|
seconds * | integer | Duration in seconds (1-30) |
camera | string | Camera ID |
fps | integer | Frames per second (1-10) |
region | string | Optional named region to crop |
get_timeline
Returns a contact sheet of buffered history frames plus timestamp-aligned event lines from serial or log adapters. Use to correlate hardware events (e.g. crash, reset, button press) with visual frames.
| Parameter | Type | Description |
|---|---|---|
camera | string | Camera ID |
include_events | boolean | Whether to overlay adapter events on the timeline banner |
last_seconds | integer | Duration of history window in seconds (1-60) |
measure
Compute quantitative measurements on the camera frame or region without returning heavy images. Returns mean brightness, contrast, lit-pixel percentage, dominant colors, edge density, sharpness (Laplacian variance), and motion level.
| Parameter | Type | Description |
|---|---|---|
camera | string | Camera ID |
region | string | Optional named region to measure |
watch
Asynchronously monitor the camera until a physical condition is met or timeout expires. Conditions: 'change', 'motion_start', 'motion_stop', 'brightness_above', 'brightness_below', 'color_present'. Returns fired status, timing, and before/after evidence images.
| Parameter | Type | Description |
|---|---|---|
condition * | string | Condition to wait for |
camera | string | Camera ID |
region | string | Optional named region to watch |
threshold | number | Optional numeric threshold for the condition |
timeout_s | number | Maximum wait timeout in seconds (1-120) |
define_region
Define and save a named region of interest (e.g. 'status_led', 'oled_screen', 'pixgen32') using normalized coordinates (0.0 to 1.0) or 4 corner points for perspective homography.
| Parameter | Type | Description |
|---|---|---|
name * | string | Unique region name |
camera | string | Optional camera ID to bind region to |
h | number | Region height |
parent | string | Optional parent region name for hierarchical grouping |
points | array | Optional 4 corner points [[x1,y1], [x2,y2], [x3,y3], [x4,y4]] for perspective unwarping |
units | string | Coordinate system ('normalized' or 'pixels') |
w | number | Region width |
x | number | Top-left X coordinate |
y | number | Top-left Y coordinate |
list_regions
List all saved named hardware regions of interest.
delete_region
Delete a saved named region.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of region to delete |
request_region_from_user
Ask the user in the Dashboard UI to interactively draw a region on the camera preview. Blocks until user finishes drawing or timeout.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the requested region |
message | string | Instructions for user on what to select |
save_baseline
Capture and persist a golden reference image for subsequent comparison. Use to establish a known-good baseline before running experiments or flashing firmware.
| Parameter | Type | Description |
|---|---|---|
name * | string | Baseline name |
camera | string | Camera ID |
region | string | Optional named region to save as baseline |
compare_to_baseline
Compare the current physical camera state against a saved baseline. Returns SSIM structural similarity score, percent of changed pixels, and a visual difference heatmap image.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of baseline to compare against |
camera | string | Camera ID |
region | string | Optional named region |
read_text
Perform OCR to extract printed text or seven-segment display digits from the camera frame or region. Returns extracted text and confidence.
| Parameter | Type | Description |
|---|---|---|
camera | string | Camera ID |
region | string | Optional named region containing text/display |
rectify_region
Capture and perspective-correct (unwarp/rectify) an angled hardware region or screen into a flat, orthogonal top-down image. Returns the rectified image for high-precision inspection or OCR.
| Parameter | Type | Description |
|---|---|---|
region * | string | Name of the defined region to rectify |
camera | string | Camera ID (default: primary camera) |
format | string | Image format (default jpeg) |
analyze_led
Sample high-speed frames of an LED or indicator to detect state (solid_on, blinking, off), blink frequency in Hz, duty cycle, and exact perceived color (red, green, blue, amber, etc.).
| Parameter | Type | Description |
|---|---|---|
camera | string | Camera ID (default: primary camera) |
duration_s | number | Sampling window in seconds (default 1.5, range 0.5 to 5.0) |
fps | number | Sampling frame rate in FPS (default 25.0, range 10 to 60) |
region | string | Optional named region covering the LED |
set_camera_settings
Adjust hardware camera parameters: exposure, focus, brightness, contrast, gain, white balance, or lock auto settings. Reports exactly which parameters were accepted vs rejected by the driver.
| Parameter | Type | Description |
|---|---|---|
camera * | string | Camera ID |
brightness | integer | Brightness value |
contrast | integer | Contrast value |
exposure | integer | Manual exposure value |
focus | integer | Manual focus value |
gain | integer | Gain value |
lock_auto | boolean | Lock auto-exposure/focus to current values |
white_balance | integer | White balance value |
read_events
Read timestamped lines from an active event adapter (serial, log file, MQTT). Can block until specific text appears or until timeout.
| Parameter | Type | Description |
|---|---|---|
source * | string | Adapter source name (e.g. 'serial:COM1', 'logfile') |
last_seconds | number | Time window in seconds |
lines | integer | Max lines to return |
timeout_s | number | Timeout in seconds to wait for until_text |
until_text | string | Optional text to wait for |
run_action
Execute a configured allowlist action (e.g. 'reset_board', 'pause_print'). Subject to approval policy. If observe_seconds is configured, returns post-action timeline sheet.
| Parameter | Type | Description |
|---|---|---|
name * | string | Allowlisted action name |
args | array | Optional arguments |