Skip to main content
Glama

define_region

Create and save named regions of interest, such as status LEDs or screens, using normalized or pixel coordinates to monitor specific camera areas.

Instructions

Define and save a named region of interest (e.g. 'status_led', 'oled_screen', 'nozzle_area') using normalized coordinates (0.0 to 1.0) or pixels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hYesRegion height
wYesRegion width
xYesTop-left X coordinate
yYesTop-left Y coordinate
nameYesUnique region name
unitsNoCoordinate system ('normalized' or 'pixels')normalized
cameraNoOptional camera ID to bind region to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. 'Save' implies persistence, but it does not disclose whether re-defining an existing name overwrites, errors, or versions; whether regions survive across sessions; or what permissions are required. Those are exactly the facts an agent needs before a mutating call.

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

Conciseness5/5

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

A single front-loaded sentence that leads with the action and resource, then supplies coordinate conventions and examples. No filler, nothing repeated from the schema.

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 7-parameter mutating tool with no annotations and no output schema, the description covers purpose and coordinate units but omits collision behavior, persistence scope, and whether the created region is returned. Adequate as a minimum viable definition, but not complete for a write tool of this complexity.

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 already 100% (baseline 3), and the description adds genuinely new information the schema lacks: the normalized coordinate range (0.0 to 1.0). It stops short of clarifying pixel-space origin or how units interacts with x/y/w/h, so it is an increment rather than a full complement.

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?

States a specific verb pair (define and save), the resource (a named region of interest), and concrete domain examples ('status_led', 'oled_screen', 'nozzle_area') that make the intent unmistakable. It also distinguishes itself from the sibling list_regions/delete_region by emphasizing creation and persistence, so an agent can tell it apart without opening schemas.

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 says when to choose this tool over the nearby alternatives such as request_region_from_user or measure, nor does it state prerequisites (e.g. a bound camera, existing name collisions). It offers the normalized-vs-pixels choice but no guidance on which context calls for it.

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