Skip to main content
Glama

anchor_probe

Evaluate multiple OpenCV anchors against one window frame, returning matched, ambiguous, missing or unreadable states plus a hash, so GUI running-vs-idle checks need just one capture.

Instructions

Judge several OpenCV template anchors against ONE window frame. Read-only, no clicking. Returns matched / ambiguous / missing / unreadable, a per-anchor state map and the frame sha256, so a running-vs-idle decision comes from one capture instead of N racing ones. A minimized window returns WINDOW_MINIMIZED instead of an all-missing verdict.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "hwnd": "<hwnd>",
      "names": "<names>"
    },
    "name": "anchor_probe"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNo
hwndYes
namesYesanchor names stored in the app profile
storeNoanchor store root (default ~/.codex-home/anchors)
roi_padNosearch only the stored rect plus this pad; ~20x faster, assumes the control has not moved
thresholdNo
color_themeNo
scale_productNorender scale of the capture; omit to infer from window DPI

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it declares the operation read-only with no clicking, enumerates the four result states, promises a per-anchor state map and frame sha256, and discloses the WINDOW_MINIMIZED edge case that prevents a false all-missing verdict.

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 dense sentences with the core contract front-loaded and no filler. The minimized-window sentence is valuable but sits apart from the return-value list it modifies, slightly hurting flow.

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 exists, and the description compensates by fully describing return states and the sha256 output. The remaining gap is parameter guidance for an 8-parameter tool, which the definition does not attempt.

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

Parameters2/5

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

Schema coverage is only 50% across 8 parameters, and the description explains none of them — hwnd, names, threshold, color_theme, and the roi_pad speed/assumption tradeoff are left entirely to the schema. Only roi_pad and scale_product have schema text to compensate.

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+resource: judging multiple OpenCV template anchors against a single window frame, with the scope contrast of 'ONE capture' vs 'N racing ones'. It never names sibling anchor_wait, so an agent must infer the probe-vs-wait distinction from behavior alone.

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?

Explains the usage context well: a running-vs-idle decision should come from one capture rather than repeated racing captures, and 'Read-only, no clicking' implies this is a safe inspection step before acting. No explicit when-not-use or named alternative such as anchor_wait.

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