Skip to main content
Glama

element_offset

Get the offset position of an element relative to the viewport. Use it to locate elements precisely when automating WeChat mini-programs.

Instructions

获取元素位置偏移(相对视口)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
element_idYes
Behavior3/5

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

无注解,描述承担全部责任。提供了相对视口这一关键行为,但未说明返回值格式、错误情形或是否适用于隐藏元素,信息量有限。

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?

一句话简洁明了,无冗余,信息充分。

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?

工具简单(1个参数),描述基本说明了用途和关键限定,但缺乏参数解释和使用场景,考虑整体简单性尚可但有明显空缺。

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未描述element_id,工具描述也未提及该参数。仅参数名暗示其含义,描述未提供额外语义,而schema覆盖率低,描述应做补偿但未做。

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?

描述明确说明了工具是获取元素位置偏移(相对视口),动词和资源清晰,能与其他元素查询工具(如element_size、element_text)区分。

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?

描述未提供何时使用此工具、何时不使用或替代方案的信息,在众多元素工具中缺乏选择指引。

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/pureia/wechat-devtools-mcp'

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