Skip to main content
Glama

page_setData

Update page data directly with partial merge of top-level or path keys. Returns updated key list. Use to force test states without triggering page logic or events.

Instructions

用 page.setData 直接更新当前页面 data(传 data 对象,最多 100 个键;键为顶层字段或微信路径语法如 list[0].done,作为部分合并写入)。返回已更新的键名列表确认,不回显值。⚠️ 直接改状态、绕过页面逻辑/事件处理——若想模拟真实交互请改用 page_callMethod 调页面方法或用 element_tap 等触发;本工具仅用于强制构造测试状态。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
connectionNo可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。
Behavior5/5

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

No annotations provided, so description fully covers behavior: partial merge write, returns key names only, bypasses page logic/event handling, and the caution about direct state change.

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?

Short, focused, front-loaded paragraph with main action, constraints, return info, and usage warning. No redundant content.

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

Completeness5/5

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

Complete for a mutation tool with no annotations and no output schema: covers parameter meaning, behavior, return value, and context for appropriate use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage for data is 0% but description fully explains data parameter: object with up to 100 keys, path syntax, partial merge. Connection parameter has schema description, so description adds value beyond schema for the key parameter.

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?

Description clearly states it updates current page data using page.setData, specifying constraints (max 100 keys, path syntax) and distinguishes from sibling tools like page_callMethod and element_tap by noting this is for direct state manipulation.

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

Usage Guidelines5/5

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

Explicitly provides when-to-use (for forced test state construction) and when-not-to (for simulating real interaction, suggesting alternatives like page_callMethod, element_tap).

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/Chaixueyuan/weapp-agent-mcp'

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