Skip to main content
Glama

Create interaction zones

create_interaction_zones

Define rectangular zones over a camera or motion input; each zone fires when motion in that region crosses a threshold, outputting state and dwell channels for interaction.

Instructions

Define N rectangular zones over a camera / motion input; each zone fires when motion in that region crosses a threshold. Builds a stock-TOP chain — a motion-energy TOP (monochrome → previous-frame cache → difference), then per zone a cropTOP (region isolate) + analyzeTOP average + toptoCHOP, merged into one level CHOP, then a scriptCHOP that emits per zone a *_state channel (0/1 active) and a *_dwell channel (seconds continuously active). Ends on a 'zones' Null CHOP as the bind point — wire cues via bind_to_channel to op('…/interaction_zones/zones')['zone0_state']. Camera-only (no depth cam). Source is a TOP pulled via selectTOP, or a built-in synthetic animated Noise TOP when omitted (offline-safe, cooks clean on any install with no external asset). A live Threshold knob tunes sensitivity. Zones are normalized rects (x,y = top-left corner, w,h = size); the top-left image convention is mapped to TD's bottom-left uv origin. Returns a summary plus JSON with the container path, created node paths, the zones Null path, per-zone state/dwell channel names, the zone definitions, threshold, and warnings (no preview image — the output is a CHOP, not a TOP).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName of the container COMP created under parent_path.interaction_zones
zonesNoRectangular zones (normalized 0..1) to watch.
thresholdNoMotion level above which a zone counts as active.
resolutionNoAnalysis resolution [width, height] in pixels (cheap; motion detection is bandwidth-bound).
parent_pathNoParent COMP the interaction-zones container is created inside (default '/project1')./project1
source_pathNoTOP to watch for motion (pulled via selectTOP). Omit for a built-in synthetic animated Noise TOP that cooks clean on any install (offline-safe, no external asset).
Behavior5/5

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

Annotations (readOnlyHint=false, openWorldHint=true, destructiveHint=false) align with the description, which details the internal chain created (motion-energy TOP, cropTOP, analyzeTOP, etc.), output as a CHOP, and warns of no preview image. The description adds significant behavioral context beyond annotations.

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 detailed but each sentence contributes useful information. It could be slightly more concise, but it is well-structured with a logical flow from purpose to output.

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

Completeness5/5

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

Given the tool's complexity (creates a chain of operators), the description covers all essential aspects: output format, channel names, bind point, zone definitions, threshold, and limitations. No output schema exists, so the description adequately describes return values.

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 descriptions cover 100% of parameters, but the description adds valuable context such as the normalization convention (top-left to bottom-left uv mapping) and the behavior of source_path when omitted. This augments the schema meaning.

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 description clearly states the tool's purpose: 'Define N rectangular zones over a camera / motion input; each zone fires when motion in that region crosses a threshold.' It does not merely restate the name and distinguishes it from siblings by describing a specific functional chain.

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 explains when to use (motion detection zones) and provides context: 'Camera-only (no depth cam)', source can be a TOP or synthetic for offline use. It does not explicitly list alternatives, but the context is clear enough for selection among many 'create_*' siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pantani/tdmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server