Skip to main content
Glama

define_region

Create and save named regions of interest on camera feeds using normalized coordinates or four corner points for perspective homography.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
hNoRegion height
wNoRegion width
xNoTop-left X coordinate
yNoTop-left Y coordinate
nameYesUnique region name
unitsNoCoordinate system ('normalized' or 'pixels')normalized
cameraNoOptional camera ID to bind region to
parentNoOptional parent region name for hierarchical grouping
pointsNoOptional 4 corner points [[x1,y1], [x2,y2], [x3,y3], [x4,y4]] for perspective unwarping

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / parent
      Added value: +{
      +  "description": "Optional parent region name for hierarchical grouping",
      +  "type": "string"
      +}
    • addedInput schema / properties / points
      Added value: +{
      +  "description": "Optional 4 corner points [[x1,y1], [x2,y2], [x3,y3], [x4,y4]] for perspective unwarping",
      +  "items": {
      +    "items": {
      +      "type": "number"
      +    },
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "type": "array"
      +  },
      +  "maxItems": 4,
      +  "minItems": 4,
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "x",
      -  "y",
      -  "w",
      -  "h"
      -]New value: +[
      +  "name"
      +]
  2. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations present, the description carries the full burden. It usefully discloses that regions are persisted ('save') and that two coordinate modes exist, but omits mutation-relevant behavior: what happens on a duplicate name, whether camera binding is required, and whether an existing region is overwritten.

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?

A single dense sentence that front-loads the purpose, then examples, then the two coordinate methods. Nothing is wasted, though the embedded example list makes the sentence slightly busy.

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

Completeness3/5

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

For a 9-parameter creation tool with no annotations and no output schema, the description covers the coordinate model but is silent on name uniqueness semantics, the optional camera/parent binding, and what the caller can expect after saving. Adequate but leaves meaningful gaps for a mutation tool.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: the normalized 0.0–1.0 coordinate range and the fact that the 4-point form is for perspective homography (the schema only says 'unwarping'). This clarifies the two mutually exclusive input approaches beyond the schema text.

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

Purpose4/5

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

States a specific verb and resource ('Define and save a named region of interest') and enumerates concrete examples ('status_led', 'oled_screen'), which clearly separates it from siblings like list_regions, delete_region and rectify_region. It does not explicitly name those siblings, so it falls short of a 5.

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

Usage Guidelines2/5

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

The description never states when to use this tool versus alternatives such as request_region_from_user (interactive capture) or rectify_region (applying an existing region). Usage can only be inferred from the verb 'Define and save'. No prerequisites or exclusions are given.

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