Skip to main content
Glama

cv_locate

Locate simple targets by color segmentation or template matching (0-4px accuracy). Good for solid UI elements and fixed templates; complex objects require VLM-based tools.

Instructions

传统 CV 精定位(备选方案):颜色分割 + 连通域质心(像素级,零依赖,实测 0-4px)或模板匹配。适用简单目标(纯色 UI 元素、几何图形、固定模板);泛化有限,通用目标请用 locate_object / som_locate。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNo颜色名(red/green/blue/yellow/orange/purple/cyan/white/black/gray) 或 [r,g,b] 或 [r1,g1,b1,r2,g2,b2],与 template 至少其一
imageYes
coordsNo返回坐标单位:pixel(默认)或 norm(0-1000 归一化)
targetYes目标描述
min_areaNo最小色块面积过滤,默认 0
templateNo模板图路径(模板匹配模式),与 color 至少其一;建议在 VLM 粗定位后的局部图上使用
Behavior4/5

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

With no annotations, the description carries full burden. It discloses internal mechanisms (color segmentation, centroid, template matching), zero dependencies, and measured accuracy (0-4px). However, it does not mention output format or potential failure modes, leaving a minor transparency gap.

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?

Two sentences, front-loaded with core function, then use cases and alternatives. No wasted words, 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?

No output schema, but the description covers purpose, method, accuracy, use cases, and alternatives. It does not explicitly state the return format, though the schema's coords parameter hints at it. Given moderate complexity and good schema coverage, it is mostly complete.

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 high (83%), so baseline is 3. The description adds value by clarifying that color and template are alternative modes (matching the schema's 'at least one' requirement) and suggesting template use on VLM coarse-localized local regions, which is not in the schema field descriptions.

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 it performs traditional CV precise localization via color segmentation + connected component centroid or template matching. It explicitly positions itself as an alternative to locate_object/som_locate, distinguishing it from siblings with specific methods and scope.

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

Usage Guidelines5/5

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

The description explicitly states suitability for simple targets (solid colors, geometric shapes, fixed templates) and limitations of generalization, then directly instructs to use locate_object/som_locate for general targets. This provides clear when-to-use and alternatives.

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/zouyuanqing/vision-primitives-mcp'

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