Skip to main content
Glama
wooter-s

weixin-devtools-mcp

by wooter-s

assert_attribute

Assert that a WeChat mini-program element's attribute matches an expected value, using a page snapshot ref or locator path.

Instructions

断言元素属性值

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes
attributeKeyYes属性名
attributeValueYes期望的属性值

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
codeYes
dataYes
metaYes
errorYes
warningsYes
nextActionsYes
observationYes
partialDataYes
schemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. 'Assert' implies a check and potential failure, but the description does not state whether it throws, returns a result, waits, or has side effects. An agent cannot predict the tool's runtime behavior from this text.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short phrase, which is under-specification rather than conciseness. It provides no structural information, front-loading, or elaboration that would help an agent decide or invoke the tool, and it barely surpasses restating the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the target parameter (with ref vs path locators, multiple selector kinds, and max depth of 16), the description is critically incomplete. It omits behavior, return semantics, and any advisory on constructing valid locators, so an agent lacks essential information for reliable invocation despite the output schema being present.

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?

The phrase 'element attribute value' loosely maps to the three parameters (target, attributeKey, attributeValue), but adds no detail about locator formats, value matching rules, or relationships. With schema description coverage at only 67%, the description should compensate for the gaps but does not, leaving the agent reliant solely on the schema.

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?

The description states a specific verb ('断言'/assert) and resource ('元素属性值'/element attribute value), which clearly separates it from sibling tools like assert_text and assert_state. However, it is extremely terse and does not elaborate on the semantics beyond a direct restatement of the tool's name, so it only partially earns differentiation.

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?

There is no guidance about when to use this tool versus alternatives, nor any exclusions or context. The description gives no hint about the intended scenario (e.g., in a test flow versus runtime validation) or how it differs from assert_text or get_value.

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