Skip to main content
Glama

desktop_locate

Locate a UI element, text, or button in a screenshot and return its physical pixel coordinates (x,y). Uses coarse-to-fine alignment for ~±5px accuracy.

Instructions

在截图中定位一个 UI 元素/文字/按钮,返回物理像素坐标 (x,y)。采用多阶段精定位:全图校准粗定位 → 局部放大精定位,误差约 ±5px。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refineNo是否做精定位(默认 true)
targetYes要定位的目标描述,如 '开始游戏按钮'、'下载按钮'、'游戏版本(测试版)'
image_pathNo截图路径(可选,缺省自动截图)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description must carry the full behavioral burden. It discloses the multi-stage refinement process and ±5px accuracy, which is useful, but it does not explicitly state whether the tool is read-only (no state changes) or what happens on failure (e.g., element not found). The mention of auto-screenshot via optional image_path is implicit but not fully explicit.

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 a single, efficient sentence in Chinese that front-loads the core purpose (locate UI element, return coordinates) before diving into methodology. No wasted words, though it could be slightly more structured with a period after the main clause.

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 simple locate tool with 100% parameter coverage and no output schema, the description covers the key aspects: what it does, method, accuracy. However, it omits failure behavior (e.g., if the target is not found) and does not clarify whether the tool performs any side effects (it likely doesn't, but this is not stated). The missing output schema shifts some burden to the description, but the core usage is adequately covered.

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?

The input schema covers all parameters with descriptions, so the baseline is 3. The tool description adds context about the refinement process that relates to the 'refine' parameter, but it does not add meaning beyond what the schema already states for target and image_path. The schema descriptions are sufficient.

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 action (locate), the resource (a UI element/text/button in a screenshot), and the output (physical pixel coordinates x,y). It is distinct from sibling tools like desktop_click (clicking) and desktop_screenshot (capturing), making its purpose unambiguous.

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 provides no guidance on when to use this tool versus alternatives, nor does it mention any exclusions or prerequisites. An agent cannot infer when to prefer desktop_locate over desktop_click_target or other siblings based on the description alone.

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