Skip to main content
Glama

element_wxml

Retrieve the WXML structure of a specified element in a WeChat mini-program. Set includeSelf to true to also obtain the element's outer WXML.

Instructions

获取元素 WXML 结构(默认内部 WXML,includeSelf=true 返回包含自身的 outerWXML)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
element_idYes
includeSelfNo为 true 时返回包含元素自身的 outerWXML,默认仅返回内部 WXML
Behavior3/5

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

With no annotations, the description must disclose behavioral traits. It explains the default output (internal WXML) and the effect of includeSelf, which is useful. However, it does not explicitly state that the operation is read-only or describe the return format, potential errors, or any side effects. For a simple getter, this is adequate but not comprehensive.

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 a single, compact sentence that front-loads the primary action and clearly explains the key option. Every word contributes meaning with no redundancy or filler. It is appropriately sized for the tool's simplicity.

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 simple getter with two parameters and no output schema, the description covers the core functionality and the behavioral toggle. However, it does not elaborate on the return value beyond 'WXML structure', nor does it mention edge cases or error conditions. Given the tool's low complexity, this is nearly complete.

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 schema provides descriptions for only 50% of parameters (includeSelf). The description partially compensates by mentioning includeSelf's effect, but it does not add meaning to element_id, which lacks a schema description. Since element_id is straightforward in context, the description adds limited value beyond the 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?

The description clearly states the tool's purpose: to retrieve the WXML structure of an element. It specifies the default behavior (internal WXML) and the includeSelf option, which distinguishes it from sibling tools like element_text or element_attribute. The verb '获取' (get) and resource '元素 WXML 结构' are specific and unambiguous.

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

Usage Guidelines3/5

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

The usage is implied by the description and tool name: use this to get WXML structure. However, it does not explicitly mention when to use this over alternatives or any exclusions. There is no clear guidance on scenarios where other element_* tools would be more appropriate, nor any prerequisites or side effects noted.

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