Skip to main content
Glama

Teach a colour

teach_colour

Train the robot's AI to recognize a color from a camera view, so it tracks the object independently and the label works in approach, face, and wait commands.

Instructions

Teach the robot's onboard AI to detect a colour, sampled from part of the current camera view (for example a cup you spotted in a look() photo). The robot then tracks it by itself, many times a second, and its name works as a label in approach_object, face_object and wait_for. This is the colour signature from VEXcode's AI Vision Utility; the robot holds 7.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesA name for it, e.g. 'red cup'
box_xyxyYesWhere it is in a look() photo, as [x0, y0, x1, y1] pixels of the 640×480 image. Choose a box well inside the object so only its colour is sampled.
width_mmNoThe object's real width in mm, if known: lets its distance be estimated and the control panel map place it
toleranceNonormal

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare a non-destructive, non-open-world write, so the safety profile is covered. The description adds real behavioral context beyond that: the robot tracks the colour autonomously many times a second, the label becomes a reusable identifier, and the robot holds only 7 signatures — a capacity constraint an agent needs. It doesn't say what happens when the 7-slot limit is exceeded or whether re-teaching overwrites.

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?

Three sentences, front-loaded with the core purpose, then the persistence/label-reuse consequence, then the capacity detail. Efficient with little waste, though the VEXcode AI Vision Utility reference is slightly tangential.

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 4-param mutation with no output schema, the description covers purpose, autonomous tracking behavior, label reuse, and the 7-signature capacity. It omits return values, overwrite/error behavior, and any note on the undocumented tolerance parameter, but is largely complete for its complexity.

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

Parameters3/5

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

Schema coverage is 75%: label, box_xyxy and width_mm are all documented in the schema, and box_xyxy even includes the 'well inside the object' sampling advice. The description adds only that sampling comes from the current camera view. The 'tolerance' enum is undocumented in both schema and description, so the description does not compensate for that gap.

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+resource ('Teach the robot's onboard AI to detect a colour') and clarifies the sampling source (part of the current camera view). An agent can distinguish this from sibling tools like detect_objects or look without opening a schema.

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?

Gives clear context for when to use it — sampling a colour from something spotted in a look() photo — and explains the payoff (label reusable in approach_object, face_object, wait_for). No explicit exclusions or statement of when not to use it, so it stops short of a 5.

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