Skip to main content
Glama

obsbot_zoom_to_fit

Center the gimbal on a snapshot region and adjust zoom so the region fills the frame, making precise framing possible.

Instructions

Frame a region of a frame you just captured: centre the gimbal on it and zoom so the region fills the frame. Give x/y/width/height of the region plus the frameWidth/frameHeight from THE SAME obsbot_capture_snapshot result — mixing a region from one frame with dimensions from another frames the wrong place and cannot be detected. Must come from a snapshot, and takes the same source declaration as obsbot_aim_at_pixel. margin (default 0.1) backs the zoom off by that fraction so the region isn't framed edge-to-edge; the tighter of the region's two axes decides the zoom, so the WHOLE region stays visible rather than being cropped on one side. Moves the gimbal BEFORE zooming, since zooming first can push the region's centre out of frame. Refuses on the same conditions as obsbot_aim_at_pixel: AI tracking active, the camera was asleep (waking it moves the gimbal and invalidates the frame), the FOV mode can't be decoded, a corrupt zoom reading, or the region's centre lying past vertical from the current pose, or a frame that isn't 16:9 (obsbot_capture_snapshot always returns 16:9; a non-16:9 pair looks transposed). Also refuses a region that isn't within the frame (edges included), or has non-positive width/height. The requested zoom is clamped to the camera's [1x, 4x] magnification range and reported via clamped; a partial fit still moves and zooms to the limit. Zoom ramps rather than jumping, so the tool polls the status block for up to 3s waiting for it to arrive and returns settled:false (not an error) if it didn't — a frame captured mid-ramp is at an unknown magnification, so check settled before trusting a follow-up snapshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
widthYes
cameraNo
heightYes
marginNo
sourceNodevice
frameWidthYes
frameHeightYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0
  2. Removedv0.6.2
  3. First observedv0.6.2

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With zero annotations, the description carries the full burden and meets it exceptionally: it discloses execution ordering ('moves the gimbal BEFORE zooming'), silent failure modes ('mixing a region from one frame with dimensions from another... cannot be detected'), nine specific refusal conditions, zoom clamping to [1x, 4x] with a `clamped` report, the 3-second polling window, and that `settled:false` is returned as a non-error. This goes far beyond what any annotation set would provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long (roughly 250 words) but appropriately so for a tool with 9 parameters and numerous edge cases; no sentence is filler. It is front-loaded with the core purpose and flows logically from input constraint (same snapshot) to margin behavior, execution ordering, refusal conditions, clamping, and settling. The dense refusal-condition list is slightly hard to parse, but every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool this complex — no annotations, no output schema, 0% schema descriptions — the description covers an extraordinary amount: prerequisites, ordering, silent-failure warning, refusal conditions, clamping, and the meaningful return fields `clamped` and `settled`. The only real gaps are the coordinate system origin/units for the region parameters and the full success-return shape beyond `clamped`/`settled`, which keeps it from a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it substantially does: it explains the critical same-snapshot dependency between x/y/width/height and frameWidth/frameHeight, the margin parameter's backing-off behavior with default 0.1, the source enum's shared semantics with obsbot_aim_at_pixel, and the 16:9 transposition tell for swapped dimensions. Minor gaps remain — pixel units and coordinate origin for x/y/width/height are never stated — but the essential semantic relationships are well covered.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence 'Frame a region of a frame you just captured: centre the gimbal on it and zoom so the region fills the frame' names a specific composite operation (aim + zoom) on a specific resource (a region of a captured frame). It clearly differentiates from siblings like obsbot_aim_at_pixel (single-pixel aim), obsbot_gimbal_move (raw movement), and obsbot_zoom_uvc/zoom_vendor (raw zoom), and references these relations explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description establishes a clear workflow context: use this after obsbot_capture_snapshot, and it says it 'takes the same source declaration as obsbot_aim_at_pixel' and 'refuses on the same conditions as obsbot_aim_at_pixel', anchoring its behavior to a sibling. It does not explicitly enumerate when-not-to-use versus raw zoom/move tools, but the snapshot-dependent precondition and framing purpose make the selection criteria largely unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.