Skip to main content
Glama

ui_locate

Locates UI controls such as buttons, inputs, or icons by matching target descriptions to OCR text, returning pixel coordinates for clicking or typing.

Instructions

UI 元素定位(文本锚定优先):目标描述 → 关键词 → OCR 文本匹配 → 控件框(像素级)。按钮/输入框/图标等 UI 点击类目标的备选精定位;返回 matched + 候选列表供 VLM 确认。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo目标类型过滤,可选
imageYes
coordsNo返回坐标单位:pixel(默认)或 norm(0-1000 归一化)
targetYes目标描述,如:点击「登录」按钮 / 搜索框输入 hello / 右上角图标
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the OCR-based text-anchoring process, pixel-level bounding box output, and the fact that it returns a candidate list for VLM confirmation. This goes beyond just saying 'locates elements' and provides useful behavioral insight.

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?

The description is concise and front-loaded with the core purpose, followed by usage context and return information. It uses two sentences without filler, effectively packing method, use case, and output details.

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-parameter tool with no output schema, the description covers the method, use case, and high-level return (matched + candidate list). It doesn't detail exact output structure or failure modes, but the given information is sufficient for an agent to select and preliminarily invoke the tool.

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?

The schema provides descriptions for 3 of 4 parameters (75% coverage). The description adds meaning to the `target` parameter by explaining the interpretation flow (target description → keywords → OCR text matching), which complements the schema's literal parameter 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 the tool locates UI elements via OCR text matching, with a specific method pipeline (target description → keywords → OCR → bounding box). It also distinguishes itself from siblings like cursor_locate or cv_locate by focusing on clickable UI targets and returning a candidate list for VLM confirmation.

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 specifies that this is an alternative precise localization method for clickable UI targets (buttons, input boxes, icons), giving clear context for when to use it. However, it does not name alternative tools or explicitly state when not to use it.

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