Skip to main content
Glama

weapp-agent-mcp

npm version npm downloads license MCP

Agent-first MCP server for WeChat Mini Program debugging, automation, and lightweight regression testing.

面向 agent 的微信小程序 MCP 服务 — 让 Claude Code / Cursor / Codex 等 agent 在对话中直接驱动微信开发者工具完成调试、UI 操作、页面巡检与轻量测试。

📖 Changelog · 🐛 Issues · 💬 Discussions

weapp-agent-mcp 是一个面向 agent 的微信小程序 MCP 服务,基于 miniprogram-automator 封装微信开发者工具自动化能力,用于页面调试、元素操作、轻量回归测试与恢复友好型排查。

它适合:

  • agent 主开发 / 主调试

  • 串行截图与页面巡检

  • 轻量 scenario / report

  • 基于稳定 selector 的自动化验证

它当前不应被宣传为:

  • 并发截图通道

  • 超长高压全链路回归引擎

文档导航

更完整的文档入口见 docs/README.md

Related MCP server: WinAutoWx

为什么选 weapp-agent-mcp

如果你已经在用 Claude Code / Cursor / Codex 等 agent 写小程序,传统的 miniprogram-automator 脚本式调用不够顺手 — 你得让 agent 写 node 脚本、跑、读输出、再调整。本项目把自动化能力直接暴露成 agent 工具调用,让 agent 在对话中可以:

  • 🤖 零脚本调试 — 直接调用 mp_screenshot / page_snapshot / element_tap,不必中转脚本

  • 🔁 恢复友好 — 内置 mp_healthCheck / mp_recoverConnection,断连后能自愈,长会话更稳

  • 📋 轻量回归mp_runScenario + mp_generateScenarioReport 产出 markdown 报告,适合给 PR / oncall 用

  • 🎯 稳定 selector 优先 — 设计上鼓励 qa-* 命名锚点,减少 UI 改版后的脚本碎裂

适用 / 不适用对比

场景

是否适用

Agent 主动驱动调试 / 巡检

✅ 主推场景

写传统脚本式 e2e 测试

⚪ 直接用原生 miniprogram-automator SDK 更轻

并发截图 / 压测

❌ 不适用 — 截图通道按串行设计

长会话 / 多轮调试

✅ 有 health / recover 工具兜底

CI 上的长链路回归

⚠️ 拆短 scenario 后可用,超长链路建议专业框架

前置要求

  • 已安装微信开发者工具,支持命令行访问(cli / cli.bat

  • 本地已安装 Node.js 18+ 和 npm

  • 有可以在开发者工具中打开的小程序项目

  • 已在微信开发者工具中开启自动化测试与服务端口

快速开始

方式一:通过 npm / npx 接入(推荐,普通用户默认这样用)

不需要先把仓库拉到本地,也不需要自己手动构建 dist。只要本机有 Node.js 和 npx,就可以直接在 MCP 客户端里这样配置:

{
  "mcpServers": {
    "weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "ws://localhost:9420"
      }
    }
  }
}

如果你希望在 Claude 等客户端里用更短的别名,也可以把 MCP server key 命名为 weapp-dev,但发布包名和服务名以 weapp-agent-mcp 为准。

可选:如果你习惯全局安装,也可以先执行:

npm install -g @chaixueyuan/weapp-agent-mcp

然后把 MCP 配置改成:

{
  "mcpServers": {
    "weapp-agent-mcp": {
      "command": "weapp-agent-mcp",
      "env": {
        "WEAPP_WS_ENDPOINT": "ws://localhost:9420"
      }
    }
  }
}

方式二:本地源码构建接入(仅开发者 / 贡献者)

只有在以下场景才需要这样用:

  • 你正在开发这个仓库本身

  • 你要调试尚未发布到 npm 的改动

  • 你要在本地修改源码后立刻验证

npm install
npm run build
node dist/index.js
{
  "mcpServers": {
    "weapp-agent-mcp": {
      "command": "node",
      "args": [
        "/absolute/path/to/weapp-agent-mcp/dist/index.js"
      ],
      "env": {
        "WEAPP_WS_ENDPOINT": "ws://localhost:9420"
      }
    }
  }
}

本地开发

npm install
npm run dev

重要边界

  • mp_screenshot 当前按串行单通道能力设计,不支持并发压测

  • 复杂业务链建议拆成多个短 scenario,而不是一个超长 scenario

  • page_snapshotmp_screenshot、长 mp_runScenario 在连续复杂操作后可能超时

  • 若出现连续失败,先运行 mp_healthCheck;仅当 needsRecovery=true 时执行 mp_recoverConnection

  • 稳定性高度依赖业务页面提供清晰的 qa-* selector 或其他稳定定位锚点

MCP 客户端集成

Claude Code 自动批准工具权限

由于使用 Claude Code 调用 MCP 工具时,会触发工具调用权限申请,此时可能会丢失 MCP 与微信开发者工具的连接状态,由于获取控制台输出高度依赖连接状态,此时会无法连贯的获取输出日志,所以建议手动添加权限:

在项目目录下创建 .claude/settings.local.json 文件,或在已有文件添加以下内容后即可免确认直接调用工具,或者根据需要添加您允许免确认调用的工具:

{
  "permissions": {
    "allow": [
      "mcp__weapp-agent-mcp__mp_diagnoseConnection",
      "mcp__weapp-agent-mcp__mp_ensureConnection",
      "mcp__weapp-agent-mcp__mp_navigate",
      "mcp__weapp-agent-mcp__mp_screenshot",
      "mcp__weapp-agent-mcp__mp_callWx",
      "mcp__weapp-agent-mcp__mp_evaluate",
      "mcp__weapp-agent-mcp__mp_pollUntil",
      "mcp__weapp-agent-mcp__mp_getLogs",
      "mcp__weapp-agent-mcp__mp_runScenario",
      "mcp__weapp-agent-mcp__mp_generateScenarioReport",
      "mcp__weapp-agent-mcp__mp_currentPage",
      "mcp__weapp-agent-mcp__mp_healthCheck",
      "mcp__weapp-agent-mcp__mp_recoverConnection",
      "mcp__weapp-agent-mcp__mp_listProjects",
      "mcp__weapp-agent-mcp__mp_setDefaultProject",
      "mcp__weapp-agent-mcp__page_getElement",
      "mcp__weapp-agent-mcp__page_getElements",
      "mcp__weapp-agent-mcp__page_waitElement",
      "mcp__weapp-agent-mcp__page_waitElementGone",
      "mcp__weapp-agent-mcp__page_waitRoute",
      "mcp__weapp-agent-mcp__page_waitTimeout",
      "mcp__weapp-agent-mcp__page_expectRoute",
      "mcp__weapp-agent-mcp__page_expectVisible",
      "mcp__weapp-agent-mcp__page_expectElementText",
      "mcp__weapp-agent-mcp__page_expectCount",
      "mcp__weapp-agent-mcp__page_expectData",
      "mcp__weapp-agent-mcp__page_snapshot",
      "mcp__weapp-agent-mcp__page_getData",
      "mcp__weapp-agent-mcp__page_setData",
      "mcp__weapp-agent-mcp__page_callMethod",
      "mcp__weapp-agent-mcp__element_tap",
      "mcp__weapp-agent-mcp__element_touch",
      "mcp__weapp-agent-mcp__element_swipe",
      "mcp__weapp-agent-mcp__element_input",
      "mcp__weapp-agent-mcp__element_callMethod",
      "mcp__weapp-agent-mcp__element_getData",
      "mcp__weapp-agent-mcp__element_setData",
      "mcp__weapp-agent-mcp__element_getInnerElement",
      "mcp__weapp-agent-mcp__element_getInnerElements",
      "mcp__weapp-agent-mcp__element_getWxml",
      "mcp__weapp-agent-mcp__element_getStyles",
      "mcp__weapp-agent-mcp__element_scrollTo",
      "mcp__weapp-agent-mcp__element_getAttributes",
      "mcp__weapp-agent-mcp__element_getBoundingClientRect"
    ]
  }
}

注意: 工具名称格式为 mcp__<服务器名称>__<工具名称>,请确保服务器名称与您的 MCP 配置中的名称一致。

可选:人工预启动微信开发者工具

默认流程无需 agent 手动执行 CLI:直接调用 mp_ensureConnection,本地端口未监听且允许 AutoLaunch 时,server 会自行执行 cli auto。下面的命令只用于人工排障,或显式设置 WEAPP_AUTOLAUNCH=false 后由用户自行预启动开发者工具。

💡 在开始之前:

  1. 打开微信开发者工具

  2. 进入 设置 → 安全设置 → 服务端口

  3. 开启 "HTTP 调试""自动化测试"

人工使用命令行启动

使用命令行启动微信开发者工具并自动开启 WebSocket 服务:

macOS:

/Applications/wechatwebdevtools.app/Contents/MacOS/cli auto --project /path/to/your/project --auto-port 9420

Windows:

"C:\Program Files (x86)\Tencent\微信web开发者工具\cli.bat" auto --project C:\path\to\your\project --auto-port 9420

其中:

  • --project 指定小程序项目目录路径(请替换为实际的项目路径)

  • --auto-port 指定 automation websocket 端口(默认 9420)。注意:这个 flag 在 cli auto --help 输出里看不到,但官方 miniprogram-automator SDK 内部一直用,是有效参数

⚠️ 警告 由于沙箱机制,部分客户端不允许 MCP 访问项目目录以外的微信开发者工具的 cli,所以这里只介绍了使用 WebSocket 服务

环境变量配置

通过环境变量控制自动化工具如何连接到微信开发者工具:

变量

说明

WEAPP_WS_ENDPOINT

【推荐】 已运行的开发者工具自动化 WebSocket 端点。设置后,服务器使用 connect 模式而不是启动新实例。示例:ws://localhost:9420

WECHAT_DEVTOOLS_CLI_PATH

微信开发者工具 CLI 路径(如果默认路径有效则可选)。

WEAPP_AUTOMATOR_MODE

强制使用 launchconnect 模式。除非提供了 WEAPP_WS_ENDPOINT,否则默认为 launch

WEAPP_DEVTOOLS_PORT

launch 模式下传给 cli auto --auto-port 的自动化端口。不会在失败后自动切到其他端口。

WEAPP_DEVTOOLS_TIMEOUT

启动超时时间(毫秒,默认 30000)。

WEAPP_AUTO_ACCOUNT

传递给 --auto-account 用于自动登录。

WEAPP_DEVTOOLS_TICKET

启动时传递给 --ticket

WEAPP_TRUST_PROJECT

设置为 true 以在启动时包含 --trust-project

WEAPP_DEVTOOLS_ARGS

启动时的额外 CLI 参数(空格分隔)。

WEAPP_DEVTOOLS_CWD

传递给开发者工具进程的工作目录。

WEAPP_AUTOCLOSE

设置为 true 时,每次工具调用后关闭开发者工具会话。

WEAPP_AUTOLAUNCH

本地 connect 目标端口未监听时是否允许 mp_ensureConnection 使用 cli auto 拉起开发者工具;默认允许,设为 false 禁用。不会自动切换端口或拉起远程目标。

WEAPP_LAUNCH_TIMEOUT

启动超时时间(毫秒,默认 45000)

WEAPP_CONNECT_TIMEOUT

连接超时时间(毫秒,默认 45000)

WEAPP_PROJECT_PATH

小程序项目路径(可选)

注意: launch / 本地自动拉起最终都需要可解析的小程序项目目录。可通过 connection.projectPathWEAPP_PROJECT_PATHmp_setDefaultProject 的持久化默认值、最近项目或当前工作目录提供;显式设置的默认项目不会被后续活动会话覆盖。

工具调用可以通过 connection 对象覆盖这些默认值中的大部分。

连接模式说明

模式 A:连接已有 IDE(connect)

适用于你已经手动打开微信开发者工具,并且已经在 设置 → 安全设置 → 服务端口 中开启了自动化。

{
  "mcpServers": {
    "weapp-agent-mcp": {
      "command": "npx",
      "args": ["-y", "@chaixueyuan/weapp-agent-mcp"],
      "env": {
        "WEAPP_WS_ENDPOINT": "ws://localhost:9420"
      }
    }
  }
}

这个模式下:

  • WEAPP_WS_ENDPOINT 必须指向可被 miniprogram-automator.connect() 连接的 websocket endpoint

  • 不要把 IDE HTTP 端口误当成 websocket 端口

  • 不要手动执行 cli opencli autocli quit

  • 默认直接调用 mp_ensureConnection;它会优先复用现有会话,并在本地端口未监听时按配置自愈

  • 只想只读探测,或 ensure / recovery 已失败时,再调用 mp_diagnoseConnection

  • 不要自动切端口;如需禁止 ensure 自动执行 cli auto,设置 WEAPP_AUTOLAUNCH=false

模式 B:由 MCP 拉起 IDE(launch)

适用于当前未打开 IDE,需要 MCP 通过 CLI 启动项目。

{
  "mcpServers": {
    "weapp-agent-mcp": {
      "command": "npx",
      "args": ["-y", "@chaixueyuan/weapp-agent-mcp"],
      "env": {
        "WEAPP_AUTOMATOR_MODE": "launch",
        "WEAPP_PROJECT_PATH": "/path/to/project",
        "WECHAT_DEVTOOLS_CLI_PATH": "/Applications/wechatwebdevtools.app/Contents/MacOS/cli",
        "WEAPP_DEVTOOLS_PORT": "9420"
      }
    }
  }
}

这个模式下:

  • WEAPP_DEVTOOLS_PORT 表示 cli auto --auto-port 使用的自动化端口

  • 只有在明确使用 launch 模式时,MCP 才应该启动 IDE

  • 如果检测到同项目已经有 IDE 实例在运行,应停止自动 launch 并返回诊断信息

  • connectlaunch 两种模式不要混用

--port--auto-port 的区别

微信开发者工具至少涉及两类端口:

  • --port:IDE HTTP 服务端口

  • --auto-port:自动化 websocket 端口

这两个端口不能混用。WEAPP_WS_ENDPOINT 必须指向自动化 websocket 端口,而不是 IDE HTTP 端口。

Codex / agent 使用规则

当用户已经打开微信开发者工具时:

  1. 不要执行 cli open

  2. 不要执行 cli quit

  3. 默认直接调用 mp_ensureConnection,它会优先复用现有自动化会话

  4. mp_diagnoseConnection 仅用于只读探测,或在 ensure / recovery 失败后补充诊断

  5. 不要手动切端口;本地自动化端口未监听且 WEAPP_AUTOLAUNCH 未禁用时,mp_ensureConnection 可自行执行 cli auto

  6. 不允许自动拉起时设置 WEAPP_AUTOLAUNCH=false

可用工具

应用工具(Application Tools)

  • mp_diagnoseConnection – 只诊断当前连接目标,不启动 IDE、不修改项目状态

  • mp_ensureConnection – 确保自动化会话就绪,是连接链路默认入口;失败后再按返回指引诊断或恢复

  • mp_navigate – 在小程序内导航,支持 navigateToredirectToreLaunchswitchTabnavigateBack

  • mp_screenshot – 捕获屏幕截图并返回(或保存到磁盘)

  • mp_callWx – 调用微信小程序 API 方法(如 wx.showToast

  • mp_evaluate – 向小程序 AppService 注入并执行函数代码,适合做显式运行时读取

  • mp_pollUntil – 轮询 AppService 条件,命中后可执行动作并采集前后状态快照

  • mp_getLogs – 获取小程序控制台日志,支持按 typecontainssincelimit 过滤,并返回日志监听状态(如 listenerAttachedlastLogAtsessionId

  • mp_runScenario – 按顺序执行一组最小测试步骤,当前支持 navigatetapinputwaitRouteexpect*snapshotgetLogsscreenshot

  • mp_generateScenarioReport – 执行 scenario 并输出 markdown 报告;可选写入 outputPath,适合产出轻量回归测试记录,并可引用截图路径

  • mp_currentPage – 获取当前页面信息(路径、查询参数、尺寸和滚动位置),withData 为 true 时额外返回页面数据

  • mp_healthCheck – 聚合连接、页面、项目路径和日志监听状态,判断当前是否健康、是否需要恢复

  • mp_recoverConnection – 按标准顺序执行恢复,并返回恢复动作、恢复前后状态与最新 health

  • mp_listProjects – 列出微信开发者工具中的最近项目,方便选择项目目录

  • mp_setDefaultProject – 设置默认的小程序项目路径,设置后下次连接会自动使用该项目

页面工具(Page Tools)

  • page_getElement – 通过选择器获取页面元素,返回元素摘要信息(tagName、text、value、size、offset);设置 withWxml: true 可额外返回完整 outerWxml;支持 [index=N] 语法选择第 N 个元素

  • page_getElements – 通过选择器获取页面元素数组,返回每个元素的摘要信息;limit 默认/最大 100;设置 withWxml: true 可额外返回每个元素的完整 outerWxml;支持 [index=N] 语法

  • page_waitElement – 等待元素出现在页面上(⚠️ 不适用于自定义组件内部元素);支持 [index=N] 语法;增加超时和重试间隔参数

  • page_waitElementGone – 等待元素从页面上消失;支持 [index=N] 语法;支持超时和重试间隔参数

  • page_waitRoute – 等待当前页面路径变为指定值,适合确认导航真正完成;支持超时和重试间隔参数

  • page_waitTimeout – 等待指定的毫秒数

  • page_expectRoute – 断言当前页面路径是否等于预期值

  • page_expectVisible – 断言页面上是否存在可定位到的元素;支持 [index=N] 语法

  • page_expectElementText – 断言元素文本是否等于或包含预期值;支持 [index=N] 语法

  • page_expectCount – 断言页面上匹配选择器的元素数量是否等于预期值

  • page_expectData – 断言当前页面指定 data 路径的值是否与预期相等

  • page_snapshot – 返回当前页面的轻量结构快照,聚合 route、query、指定 data 路径和值,以及关键选择器的元素摘要;不默认处理页面 title,标题校验请用明确选择器配合 page_expectElementText

  • page_getData – 获取当前页面的数据对象,可选择指定子数据路径

  • page_setData – 使用 setData 更新当前页面的数据

  • page_callMethod – 调用当前页面实例上暴露的方法

元素工具(Element Tools)

  • element_tap – 通过 CSS 选择器模拟点击 WXML 元素;支持 [index=N] 语法选择第 N 个元素

  • element_touch – 对元素执行真实触摸事件;支持 start / move / end / sequence 四种模式,坐标基于元素左上角,默认取元素中心;支持 [index=N] 语法

  • element_swipe – 对元素执行真实滑动手势;支持 up / down / left / right,可指定距离和持续时间;支持 [index=N] 语法

  • element_input – 向元素输入文本(适用于 inputtextarea 组件)

  • element_callMethod – 调用自定义组件实例的方法

  • element_getData – 获取自定义组件实例的渲染数据

  • element_setData – 设置自定义组件实例的渲染数据

  • element_getInnerElement – 获取元素内的元素(相当于 element.$(selector)),返回元素摘要信息;设置 withWxml: true 可额外返回完整 outerWxml

  • element_getInnerElements – 获取元素内的元素数组(相当于 element.$$(selector)),返回元素摘要信息;limit 默认/最大 100;设置 withWxml: true 可额外返回每个元素的完整 outerWxml

  • element_getWxml – 获取元素 WXML(内部或外部)

  • element_getStyles – 获取元素的 CSS 样式值,names 参数为样式名数组(如 ['color', 'fontSize']

  • element_scrollTo – 滚动 scroll-view 组件到指定位置(x, y)

  • element_getAttributes – 获取元素的特性值,names 参数为特性名数组(如 ['class', 'id', 'data-index']

  • element_getBoundingClientRect – 获取元素相对于视口的边界矩形信息(left、top、width、height、right、bottom),考虑 CSS transform 变换(目前仅支持 ID 选择器、类选择器)

每个工具都接受可选的 connection 块来覆盖环境默认值(项目路径、CLI 路径、WebSocket 端点等)。

使用技巧

一般提示

  • 连接前,在微信开发者工具中启用自动化(设置 → 安全设置 → 服务端口

  • 默认先调用 mp_ensureConnection 建立或复用会话;只读探测或连接失败排查再用 mp_diagnoseConnection

  • 使用 WEAPP_AUTOCLOSE=true 适合无状态的一次性交互

  • 导航时始终使用绝对路径(以 / 开头):/pages/mine/mine

  • tabBar 页面使用 switchTab,普通页面使用 navigateTo

  • switchTab 只应视为一种导航动作,不应默认作为底部 tab UI 选中态的判断依据;很多项目会自定义底部 tab

操作自定义组件

操作自定义组件时,有两种方法:

方法一:使用 innerSelector 参数(推荐)

适用于 element_tapelement_inputelement_getWxml 等工具:

{
  "selector": "#my-component",
  "innerSelector": ".inner-button"
}
  • selector:自定义组件的选择器

  • innerSelector:组件内部元素的选择器

方法二:使用元素内查询工具

适用于 element_getInnerElementelement_getInnerElements

{
  "selector": "#my-component",
  "targetSelector": ".inner-button"
}

限制说明

  • page_waitElement 不适用于自定义组件内部元素。请使用 page_waitTimeout 配合元素查询工具进行轮询检查。

  • 页面跳转校验可优先使用 page_waitRoute,比单纯 mp_navigate 后固定等待更稳。

  • 临时弹层、loading、toast 等消失场景可使用 page_waitElementGone

自动启动功能(AutoLaunch)

本地 connect 目标端口未监听时,mp_ensureConnection 默认会使用 cli auto 拉起开发者工具。设置 WEAPP_AUTOLAUNCH=false 可显式禁用。远程 wsEndpoint 不会触发本机自动拉起。

当前安全策略是:

  1. 如果用户已经手动打开 IDE,应优先使用 connect

  2. 本地 connect 端口未监听时,MCP 可自动执行 cli auto,但不自动切模式、不自动切端口

  3. autoLaunch=false 或远程 wsEndpoint 时不会自动启动 IDE

  4. 如果检测到 DevTools 已在运行,会优先阻止重复拉起

配置示例

{
  "mcpServers": {
    "weapp-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@chaixueyuan/weapp-agent-mcp"
      ],
      "env": {
        "WEAPP_AUTOLAUNCH": "true",
        "WEAPP_PROJECT_PATH": "D:\\path\\to\\your\\project"
      }
    }
  }
}

工作流程

  1. 首次连接时,检测到本地自动化端口未监听且未设置 WEAPP_AUTOLAUNCH=false

  2. 检查 9420 端口是否有服务

  3. 无服务则自动启动开发者工具(使用 cli.bat auto --project <path> --auto-port 9420

  4. WEAPP_LAUNCH_TIMEOUT 等待开发者工具就绪(默认 45 秒)

  5. 建立 WebSocket 连接

  6. 后续连接自动复用现有连接

提示:使用 mp_setDefaultProject 设置默认项目后,下次连接无需再次选择项目。

Available Tools

44 tools
element_callMethodA

调用自定义组件实例的方法(element.callMethod()),返回该方法的返回值(序列化后放在 result)。仅对自定义组件实例有效,普通 WXML 元素会失败;调用页面级方法请用 page_callMethod。读/写组件实例数据用 element_getData / element_setData。method:方法名;args:按顺序展开传入方法的参数数组。要定位嵌套在外层组件内的组件,用 selector + innerSelector。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
argsNo
methodYes
maxBytesNo
selectorYes
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。
innerSelectorNo

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries full burden. It explains that the method is called via element.callMethod(), returns the serialized result, and fails on non-custom components. This is transparent, though it could mention error handling for missing methods.

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

Conciseness4/5

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

The description is a single paragraph but is concise and informative. Every sentence adds value, though a bulleted list would improve readability. No redundancy.

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?

Given no output schema, the description adequately explains the return value (serialized method result). It also addresses failure conditions and distinguishes from the many sibling tools. Minor omission: no mention of timeout or synchronous nature.

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?

Schema description coverage is low (17%), but the description explains key parameters: method, args, selector, and innerSelector. It clarifies that args are spread in order and that selector supports [index=N]. It does not explain maxBytes or repeat connection's schema description, which is acceptable.

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 calls a method on a custom component instance and returns the result, using specific verb '调用' and resource '自定义组件实例的方法'. It distinguishes from sibling tools like page_callMethod and element_getData/element_setData.

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 states when to use this tool (custom component instances only, not normal WXML elements) and when to use alternatives (page_callMethod for page-level, element_getData/element_setData for data). Also provides guidance on nested component selection and index syntax.

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

element_getAttributesA

读取元素的 WXML 特性值(element.attribute(name)),如 ['class','id','data-index']。读 CSS 样式请用 element_getStyles。单个读不到的特性返回 null,全部读取失败则报错。结果超过 maxBytes(默认 50000B)会截断。要读自定义组件内部元素的特性,用 selector 定位组件、innerSelector 定位内部元素。selector 支持 [index=N](仅作用于 selector)。⚠️ 对象型 data-*(如 data-item 绑定了对象)经 WXML attribute 只能拿到字符串 '[object Object]'——需要结构化值请改用 element_getBoundingClientRect 返回的 dataset。

ParametersJSON Schema
NameRequiredDescriptionDefault
namesYes
maxBytesNo
selectorYes
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。
innerSelectorNo

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: returns null for single missing attribute, errors for all missing, truncates results over maxBytes, and notes that object-type data-* attributes return string '[object Object]' via WXML. This exceeds expectations.

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

Conciseness4/5

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

The description is fairly concise for the amount of information conveyed, but it is a single block of text without clear separation of concerns. It could benefit from bullet points or structured formatting for easier reading.

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?

Given no output schema, the description explains return values (null for missing, error for all missing, truncation) but does not explicitly state that the result is an object mapping attribute names to values. For a read tool with multiple parameters, it covers most important aspects, but leaves a small gap.

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?

Schema coverage is low (20%), but the description adds meaning for key parameters: names (list of attribute names), maxBytes (truncation threshold), selector/innerSelector (targeting). However, it does not explicitly describe the return type or the format of the results, leaving some ambiguity.

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 it reads WXML attributes (e.g., class, id, data-index) and distinguishes itself from element_getStyles for CSS styles. The verb '读取' (read) and resource 'WXML 特性值' (WXML attribute values) make the purpose specific.

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 says when to use (read attributes) and when not (CSS styles -> use element_getStyles). Provides guidance on reading custom component inner elements using selector/innerSelector, and warns about object-type data-* attributes, suggesting getBoundingClientRect instead. Also mentions truncation behavior with maxBytes.

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

element_getBoundingClientRectA

获取元素相对视口的边界矩形(left/top/width/height/right/bottom),为 CSS transform 变换后的实际渲染尺寸与位置。返回还包含 dataset(元素完整 data-* 绑定对象,含对象型值)与 id——这是读取卡片/组件绑定数据(如 plateCode/path/cardStyle)的便捷途径,优于 element_getAttributes(后者对对象型 data-* 只能拿到 '[object Object]')。支持跨组件查询:selector 设为组件选择器、innerSelector 设为内部元素选择器(内部用 >>> 穿透,比 selectComponent 更可靠)。仅支持 ID 选择器、类选择器。selector 支持 [index=N],但底层 SelectorQuery 无法可靠表达“第 N 个父元素里的 innerSelector”,因此 [index=N] 不能与 innerSelector 同时使用。选择器查询未返回矩形时抛错;微信 SelectorQuery 无法可靠区分元素不存在与 display:none。

ParametersJSON Schema
NameRequiredDescriptionDefault
maxBytesNo
selectorYes
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。
innerSelectorNo

TDQS

A4.8/5.0
Behavior5/5

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

没有注解,描述承担全部行为披露责任。完整说明了返回值(rect、dataset、id)、错误行为、跨组件查询机制(内部使用>>>)、选择器限制以及[index=N]的限制。对行为的透明性非常好。

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

Conciseness4/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.

Completeness5/5

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

对于没有输出schema的工具,描述完整涵盖了返回值、边角情况、错误处理、跨组件用法和选择器限制,没有明显信息缺口。

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?

schema覆盖率仅25%(只有connection有描述),描述中对selector和innerSelector的用法提供了额外含义,但未提及maxBytes参数。整体上,描述为selector和innerSelector增加了语义,弥补了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?

明确说明工具功能:获取元素相对视口的边界矩形(left/top/width/height/right/bottom),并强调是CSS transform后的实际渲染尺寸。还提到返回dataset和id,并对比了element_getAttributes,清晰区分了用途。

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?

提供了详尽的使用指导:说明何时使用此工具(读取卡片/组件绑定数据),对比了element_getAttributes的不足;支持跨组件查询的用法(selector和innerSelector);明确限制(仅支持ID/类选择器,[index=N]不能与innerSelector共用);以及错误处理(未返回矩形时抛错,无法区分元素不存在与display:none)。

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

element_getDataA

读取自定义组件实例的渲染数据(element.data())。仅对自定义组件实例有效;读页面 data 用 page_getData。不传 path 返回整棵组件 data(可能很大、易超 token 上限,建议尽量传 path)。path 取精确子值,如 'list.0.id'(单条路径,不支持 page_getData 的 paths[] 多路径/[*] 通配)。结果超过 maxBytes(默认 50000B,最大 1000000B)会截断。要定位嵌套组件用 selector + innerSelector。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
maxBytesNo
selectorYes
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。
innerSelectorNo

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that omitting path returns the entire data (potentially large), truncation behavior based on maxBytes, path format constraints, and selector indexing. It does not explicitly state non-destructive nature but implies it. The description adds valuable behavioral context beyond the tool name.

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

Conciseness4/5

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

The description is a single dense paragraph that efficiently conveys multiple pieces of information without redundancy. It is front-loaded with the primary purpose. While it could be broken into clearer sentences for readability, it is still concise and to the point.

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?

Given no output schema and no annotations, the description covers the main aspects: purpose, key parameters, behavioral details (truncation, path constraints). However, it does not describe the return format or error conditions, which could be useful. It is mostly complete for the tool's complexity.

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?

Schema coverage is only 20%, so the description compensates by explaining path (exact sub-values, format example), maxBytes (default and max, truncation), and the combined use of selector and innerSelector. The connection parameter is described in the schema but not in the tool description; however, the description covers the core parameters adequately.

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 reads rendering data of custom component instances, using the verb '读取' and specifying the resource. It distinguishes itself from the sibling tool page_getData by noting it only works on custom components.

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?

The description explicitly states when to use this tool (for custom components) and when not, directing to page_getData for page data. It also provides usage advice such as preferring path to avoid large data, and explains path format limitations and the use of selector+innerSelector for nested components.

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

element_getInnerElementA

在一个已定位元素的范围内查询单个子元素(element.$(targetSelector)),返回该子元素摘要(tagName/text/value/size/offset)。用法:selector(+可选 innerSelector)先定位作用域元素,targetSelector 是在该作用域内执行的查询 —— 适合在某容器/自定义组件内部缩小查询范围;若从页面根查询请用 page_getElement。withWxml=true 时额外返回该子元素的完整 outerWxml(可能很大)。结果超过 maxBytes(默认 50000B)返回 {truncated,bytes,maxBytes,note,data} 包装,关掉 withWxml 或调大 maxBytes。selector 支持 [index=N](仅作用于 selector,innerSelector/targetSelector 内不支持下标)。

ParametersJSON Schema
NameRequiredDescriptionDefault
maxBytesNo
selectorYes
withWxmlNo
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。
innerSelectorNo
targetSelectorYes

TDQS

A4.3/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden. It discloses that withWxml can return large data, results can be truncated with a wrapper object, and maxBytes can be adjusted. It also mentions selector index support limitations. It does not explicitly state read-only behavior but it is implied.

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

Conciseness4/5

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

The description is reasonably concise but dense with information. It is well-structured: first states purpose, then usage, then details about withWxml and truncation, then selector limitations. Each sentence adds value, though some redundant phrasing exists.

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?

Given the complexity (6 parameters, nested connection object, no output schema), the description explains inputs, behavior, and edge cases (truncation, Wxml size). It mentions return fields (tagName, text, value, size, offset) but does not detail the truncation wrapper structure. It is missing some error handling details but overall complete.

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?

Schema description coverage is only 17% (connection only). The description adds meaning to most parameters: selector (scope element), targetSelector (query within scope), innerSelector (optional scope refinement), withWxml (return full Wxml), maxBytes (truncation threshold). It does not fully describe selector format (e.g., CSS selector), but provides sufficient context.

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: query a single child element within a scoped element and return a summary (tagName, text, value, size, offset). It distinguishes from page_getElement for root queries and implicitly from element_getInnerElements (plural).

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 explicitly says when to use (inside a container/custom component) and when not (use page_getElement for page root). It mentions alternatives for root queries. However, it does not explicitly contrast with the sibling tool element_getInnerElements.

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

element_getInnerElementsA

在一个已定位元素的范围内查询子元素数组(element.$$(targetSelector)),返回 {count,totalCount,limited,elements[]},每个元素含摘要(tagName/text/value/size/offset)及其数组 index。limit 默认/最大 100,避免一次汇总全部子元素卡住连接;totalCount 是总命中数,count 是实际返回数。用法:selector(+可选 innerSelector)定位作用域元素,targetSelector 是在该作用域内执行的查询。withWxml=true 额外返回每个元素的完整 outerWxml。结果超过 maxBytes(默认 50000B)返回截断包装。selector 支持 [index=N](仅作用于 selector,innerSelector/targetSelector 内不支持下标)。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
maxBytesNo
selectorYes
withWxmlNo
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。
innerSelectorNo
targetSelectorYes

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the return structure (count, totalCount, limited, elements[]), default/max limit (100), truncation via maxBytes, optional withWxml, and selector index support. It omits stating that the operation is read-only (though implied) and does not mention error conditions, but covers key behavioral traits.

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

Conciseness4/5

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

The description is a single paragraph that efficiently packs purpose, return structure, defaults, and constraints. It is front-loaded with the main action. Some structuring (e.g., bullet points for parameters) could improve scanability, but it is not overly verbose and every sentence adds value.

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?

Given the complexity (7 params, no output schema, no annotations), the description provides substantial information about return structure, limits, and selector behavior. It lacks details on error handling or empty results, but it is sufficient for an agent to select and invoke the tool correctly in most cases.

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 description coverage is only 14% (connection only), so the description must compensate. It explains the purpose and interplay of selector, targetSelector, innerSelector, limit, maxBytes, and withWxml. It provides defaults and restrictions not in schema. This fully compensates for the low schema coverage.

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 retrieves an array of child elements within a positioned element using a selector, returns a structured result with count and summary details. It distinguishes itself from the sibling tool 'element_getInnerElement' (singular) by focusing on multiple elements, and from other element tools by specifying the query mechanism (element.$$).

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 explains the usage pattern: using selector and optional innerSelector to locate the scope, then targetSelector to query children. It also notes restrictions like [index=N] only for selector. However, it does not explicitly compare to alternatives like page_getElements or state when not to use this tool, but the context is adequate for most scenarios.

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

element_getStylesA

读取元素的计算样式值(element.style(name))。names 为样式名数组,用 camelCase(如 ['color','fontSize','backgroundColor']);单个读不到的名返回 null,全部读取失败则报错。结果超过 maxBytes(默认 50000B)会截断。要读自定义组件内部元素的样式,用 selector 定位组件、innerSelector 定位内部元素。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
namesYes
maxBytesNo
selectorYes
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。
innerSelectorNo

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description fully discloses behaviors: reads computed styles, error handling, truncation, and inner element access via selector/innerSelector. It does not explicitly state read-only nature, but overall transparency is strong.

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 very concise, front-loading the main purpose in the first sentence, and every subsequent sentence adds specific, non-redundant information about usage and behavior.

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?

Covers core behavior and edge cases well but lacks description of the return format (e.g., object of style values). Also does not describe the 'connection' parameter. For a tool with 5 parameters and no output schema, slightly more detail would improve completeness.

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?

Description adds significant meaning beyond the schema: explains camelCase format for names, default 50000B for maxBytes, truncation behavior, and selector [index=N] support. Only the 'connection' parameter lacks description, but schema provides its details.

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 it reads computed styles (element.style(name)) using a list of style names. The name 'element_getStyles' and sibling tools like 'element_getAttributes' show it's specifically for styles, distinguishing it from other element access tools.

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?

Provides explicit instructions: use camelCase names array, null for missing individual names, error if all fail, maxBytes truncation, and innerSelector for inner elements. It implies appropriate use cases but does not explicitly exclude alternatives or state when not to use.

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

element_getWxmlA

获取元素 WXML。默认 element.wxml() 返回内部 WXML;outer=true 返回含元素自身的 outerWxml。要读自定义组件内部的 WXML,用 selector 定位组件、innerSelector 定位内部元素。结果超过 maxBytes(默认 50000B)返回 {truncated,bytes,maxBytes,note,data} 包装(WXML 最容易撑爆);截断时改用更具体的 selector 或调大 maxBytes。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
outerNo
maxBytesNo
selectorYes
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。
innerSelectorNo

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses truncation behavior (returns {truncated, bytes, maxBytes, note, data} when exceeding maxBytes), notes that WXML is most likely to exceed, and describes default vs outer behavior. It does not discuss performance or auth, but for a read operation this is sufficient.

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

Conciseness4/5

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

The description is concise and front-loads the main purpose. It uses a few sentences to cover key details. While it could be more structured (e.g., bullet points), it is efficient and earns its sentences.

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?

Given the parameter complexity (5 params, 1 required, nested object) and no output schema, the description covers the main behavioral aspects: inner vs outer WXML, custom components, and truncation. It does not detail the output format beyond the truncation case, but it provides enough for an agent to select and invoke the tool correctly.

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 is only 20% (only connection object has a description). The description adds significant meaning: explains outer parameter effect, maxBytes default and truncation handling, selector usage with [index=N] syntax, and innerSelector for custom components. This compensates well for the low schema coverage.

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 '获取元素 WXML' (get element WXML), specifying the verb and resource. It distinguishes between internal WXML (default) and outer WXML (with outer=true), and addresses custom component WXML via innerSelector, differentiating it from sibling tools that handle other element properties.

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 provides explicit guidance on when to use outer=true vs default, when to use innerSelector for custom components, and how to handle truncation (use more specific selector or increase maxBytes). It does not explicitly state when not to use this tool, but the scenarios are well-covered.

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

element_inputA

向输入类元素(input/textarea 等)填值(element.input())。value 接受字符串或数字。要填自定义组件内部的输入框时,用 selector 定位组件、innerSelector 定位内部输入元素。selector 支持 [index=N] 取第 N 个(0 基,仅作用于 selector)。注意:非输入类元素调用会失败。

ParametersJSON Schema
NameRequiredDescriptionDefault
valueYes
selectorYes
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。
innerSelectorNo

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It reveals that value accepts string or number, selector supports indexing, and failure occurs on non-input elements. It does not cover error handling for missing elements or whether the operation is additive or overwriting, but the core behavioral traits are disclosed.

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, concise paragraph of about 80 characters. It is front-loaded with the main purpose and every sentence adds value without redundancy. Ideal conciseness.

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?

Given the complexity (4 params, no output schema), the description covers the main usage, special features, and a failure case. It could be more complete by mentioning the return value or supporting additional input types, but it is sufficient for an agent to use correctly in most scenarios.

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?

Schema description coverage is low (25%), but the description adds meaning for all parameters: explains value types, selector usage with indexing, and innerSelector for custom components. This compensates for the schema gaps. However, more details on connection parameter could be added.

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 clearly states it fills values into input-type elements (input/textarea) using element.input(). It specifies the verb and resource. It distinguishes from sibling tools like element_tap and element_setData by focusing on input elements, but could more explicitly contrast with element_setData which also modifies state.

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 explains when to use: for input-type elements, and provides guidance for custom components using innerSelector. It notes that calling on non-input elements will fail, giving a clear when-not. However, it does not mention alternatives among siblings, which would improve score.

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

element_scrollToA

将 scroll-view 组件滚动到指定绝对偏移(element.scrollTo(x,y))。仅对 scroll-view 组件有效,其它元素会失败;非 scroll-view 的滚动用手势 element_swipe。x/y 为目标 scrollLeft/scrollTop 像素值(绝对位置,非增量)。要定位自定义组件内部的 scroll-view,用 selector 定位组件、innerSelector 定位内部元素。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
selectorYes
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。
innerSelectorNo

TDQS

A4.9/5.0
Behavior5/5

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

Despite no annotations, the description fully discloses that the tool only works on scroll-view, fails on others, and explains x/y are absolute pixel values, not incremental. No contradictions.

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?

Three concise sentences in Chinese, front-loaded with the main action, no redundant information. Every sentence adds value.

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?

For a simple scroll tool with no output schema or annotations, the description covers target restriction, coordinate semantics, and component targeting adequately. No gaps.

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?

Schema description coverage is only 20%, but the description adds significant meaning: explains x/y as absolute scrollLeft/scrollTop, selector targets scroll-view, innerSelector targets internal elements. Connection parameter is partially covered by schema description.

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 scrolls a scroll-view component to an absolute position, specifies it only works on scroll-view, and distinguishes from the sibling tool element_swipe for non-scroll-view scrolling.

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 states when to use (scroll-view components) and when not to (other elements, refer to element_swipe). Also provides guidance on targeting inner scroll-views using selector and innerSelector.

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

element_setDataA

写自定义组件实例的渲染数据(element.setData())。仅对自定义组件实例有效;写页面 data 用 page_setData,读用 element_getData。data 为最多 100 个键的 键→值 对象,合并进组件 data(键可用小程序 setData 的路径写法如 'list[0].done')。要定位嵌套组件用 selector + innerSelector。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYes
selectorYes
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。
innerSelectorNo

TDQS

A4/5.0
Behavior3/5

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

No annotations provided; description covers merging behavior, key limit, path syntax, and innerSelector usage but lacks details on error handling, session requirements, or return values.

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

Conciseness4/5

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

Single paragraph efficiently covers key points without fluff. Could be slightly more structured (e.g., bullet points) but not necessary.

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?

Covers core usage constraints and sibling differentiation, but omits return value description and does not explain the connection parameter. Adequate for a well-known operation but could be more complete.

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?

Adds meaning beyond schema: explains data as key-value object with path syntax and 100-key limit, selector supports [index=N], and innerSelector for nesting. Does not detail selector format or connection 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 writes rendering data to custom component instances, distinguishes from page_setData and element_getData, and specifies the scope of validity.

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?

Explicitly says when to use (custom components) and when to use alternatives (page_setData for pages, element_getData for reading). Also mentions constraints like max 100 keys and path syntax.

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

element_swipeA

对元素执行真实滑动手势(自动 touchstart→多段 touchmove→touchend),适合列表/轮播/可拖拽区域等需要 touch 序列的场景。比 element_touch 简单,优先用本工具做滑动。direction:手指移动方向 up/down/left/right。distance:滑动距离 px,默认取元素宽或高的 60%。durationMs:手势总时长,默认 300。startX/startY:起点相对元素左上角的像素坐标,默认元素中心。waitMs:手势后额外等待毫秒。innerSelector:定位自定义组件内部元素(selector 定位组件)。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
startXNo
startYNo
waitMsNo
distanceNo
selectorYes
directionYes
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。
durationMsNo
identifierNo
innerSelectorNo

TDQS

A4.3/5.0
Behavior4/5

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

Describes the gesture sequence, default parameters (distance 60% of element width/height, duration 300ms, start at center), and extra wait time. No annotations provided, so description carries the burden; no contradictions.

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

Conciseness4/5

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

Single paragraph with front-loaded purpose and parameter list. Efficient but dense; could be structured with bullet points for readability. No wasted words.

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?

Adequate for a swipe tool with 10 parameters and no output schema. Covers purpose, usage guidance, and parameter details. Does not mention return values or errors, but not required given lacking output schema.

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?

Adds meaning beyond schema by explaining direction enum, distance default, duration default, start coordinates default, waitMs, innerSelector, and selector index support. Schema coverage is only 10%, but description compensates well.

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 performs real swipe gesture (touchstart→touchmove→touchend), specifies use case (lists, carousels, draggable areas), and distinguishes from sibling element_touch by recommending this tool for simplicity.

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?

Explicitly says to prefer this tool over element_touch for simple swipes and indicates suitable scenarios. However, does not specify when not to use it or mention alternatives.

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

element_tapA

模拟点击 WXML 元素(element.tap())。selector 用 CSS 选择器定位;要点击自定义组件内部的元素时,用 selector 定位组件(如 #my-comp 或标签名)、innerSelector 定位组件内部元素 —— 这是 page_* 无法穿透自定义组件时的正确做法。selector 支持 [index=N] 取第 N 个(0 基,仅作用于 selector,innerSelector 内不支持下标)。waitMs:点击后额外等待的毫秒数,用于等待导航/重渲染稳定再做下一步。返回 JSON 含 routeBefore,以及【仅当传了 waitMs>0 时】的 routeAfter/routeChanged —— 直接告诉你点击有没有触发跳转,省去再调一次 mp_currentPage。不传 waitMs 时不额外探测路由(routeAfter/routeChanged 为 null,语义=未探测):此时跳转通常尚未完成、读了也不准还白费一次往返,要判断跳转请传 waitMs 等导航稳定。routeAfter 读取失败时同样降级为 null,不影响点击本身已成功。

ParametersJSON Schema
NameRequiredDescriptionDefault
waitMsNo
selectorYes
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。
innerSelectorNo

TDQS

A4.7/5.0
Behavior5/5

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

No annotations provided, so description fully covers behavioral traits: selector with index notation, innerSelector for custom components, waitMs behavior, conditional return of routeAfter/routeChanged, and warning about accuracy without waitMs. Thorough and transparent.

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

Conciseness4/5

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

Single paragraph with clear, front-loaded action and detailed explanations. Slightly long but every sentence adds value. No redundancy.

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?

No output schema, but return values are fully explained. All parameters covered. Context of siblings addressed by distinguishing from page_* tools. Complete for complexity level.

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 is only 25% (only connection described), but description adds rich meaning for selector, innerSelector, and waitMs, explaining their usage, syntax, and behavioral impact. Adds significant value beyond 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 this tool simulates taps on WXML elements, distinguishes it from page_* tools which cannot penetrate custom components, and is named element_tap, making its purpose unambiguous.

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?

Explicitly guides when to use this tool over page_* methods for custom components, and when to use waitMs for navigation detection. Lacks explicit when-not-to-use scenarios but provides sufficient contextual direction.

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

element_touchA

对元素派发底层触摸事件(touchstart/touchmove/touchend)。多数场景不需要它:简单点击用 element_tap,滑动/拖拽用 element_swipe;只有需要自定义多点/长按/分段手势时才用本工具。phase:'start'/'move'/'end' 是单个事件,需自己跨多次调用拼成完整手势;'sequence' 在一次调用内完成 touchstart→moves→touchend(推荐)。x/y 可选,相对元素左上角的像素坐标,默认取元素中心。moves[] 仅在 'sequence' 下使用,是中间移动点序列(每点可带 delayMs)。holdMs:touchstart 后按住的毫秒数(长按)。identifier:触摸点 id(多指时区分,默认 1)。waitMs:整个手势后额外等待毫秒。innerSelector:定位自定义组件内部元素(selector 定位组件)。selector 支持 [index=N](仅作用于 selector)。

ParametersJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
movesNo
phaseYes
holdMsNo
waitMsNo
selectorYes
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。
identifierNo
innerSelectorNo

TDQS

A4.5/5.0
Behavior4/5

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

无注解,描述承担全部负担。说明触发底层触摸事件,区分 phase 和 sequence 的行为,以及参数如 holdMs(长按)、identifier(多指)等。但未提及返回值或潜在副作用,不过对于触摸工具而言已较充分。

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

Conciseness4/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.

Completeness4/5

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

对于有 10 个参数、嵌套对象、无输出 schema 的复杂工具,描述覆盖了几乎所有参数的使用细节和场景,但未提及返回值。整体较为完整。

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?

描述覆盖了主要参数:phase 的选择、x/y 默认取中心、moves 仅用于 sequence、holdMs 表示长按、identifier 用于多指、waitMs、innerSelector 等。由于 schema 描述覆盖率仅 10%,描述有效补偿,为参数添加了使用语义。

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?

明确说明工具用于对元素派发底层触摸事件(touchstart/touchmove/touchend),并指出多数场景应使用 element_tap 或 element_swipe,从而与同类工具区分开。

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?

明确给出使用场景:只有需要自定义多点/长按/分段手势时才用本工具;简单点击用 element_tap,滑动/拖拽用 element_swipe。还解释了 phase 的两种模式(单次事件 vs sequence),提供清晰的指导。

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

mp_callWxA

调用微信小程序 API。method 不带 wx. 前缀(内部自动拼),例如传 pageScrollTo 而非 wx.pageScrollTo。args 是按位置依次展开的参数数组:多数 wx API 收单个 options 对象,所以传 [{ scrollTop: 0, duration: 300 }](数组里放那一个 options 对象),而不是裸对象。返回 {method, arguments, result},result 为 API 返回值。

何时用:直接触发 wx.* 能力(滚动、剪贴板、storage 等)。要读 / 改 page.data 或跑任意页面逻辑用 mp_evaluate(注:个别环境的 evaluate 注入通道不可用、对任意函数都报 'is not a function',此时改用 page_getData / page_setData / page_callMethod 兜底);要等某条件就绪用 mp_pollUntil。

ParametersJSON Schema
NameRequiredDescriptionDefault
argsNo
methodYes
maxBytesNo
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。

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It explains the method prefix removal, argument expansion, return format, and notes the evaluate injection channel fallback. However, it lacks details on error handling or side effects of the API call.

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 well-structured: core action first, then parameter details, then usage guidance. Every sentence adds value without redundancy. Efficient and front-loaded.

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?

Given 4 parameters and no output schema, the description covers the main parameters, return format, and usage scenarios. Minor omission: 'maxBytes' parameter not addressed. Overall sufficient for effective tool selection.

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 has low description coverage (25%), but the description substantially compensates by explaining the 'method' naming and 'args' structure with examples. The 'maxBytes' parameter is not explained, but its purpose is inferable from context.

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 calls WeChat Mini Program APIs, specifies the method naming convention (no 'wx.' prefix), and distinguishes from siblings like mp_evaluate (for page logic) and mp_pollUntil (for waiting). It directly addresses the verb+resource and differentiates from similar tools.

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 states when to use (directly trigger wx.* capabilities) and when not to use (for page data or waiting), with fallback alternatives provided. The '何时用' section offers clear decision guidance.

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

mp_currentPageA

获取当前页面信息(path、query、size、scrollTop)。withData=true 额外返回 page.data。

何时用:想一次拿“路由 + 尺寸/滚动 + 部分 data”的概览时。 何时改用别的:只想读 data 字段 → 用 page_getData;想断言/等待某个路由 → 用 page_expectRoute / page_waitRoute(它们已替你处理路由滞后),不要在这里读 path 再手动比较。

⚠️ 路由滞后:path 来自 SDK currentPage() 句柄,是快照型,仅在“刚做完快速 navigate / reLaunch / switchTab 的那一瞬间”可能落后于真实路由;稳态下可信。刚导航完一般不用调本工具——mp_navigate 返回的 activePage 已经可信。只有在确实怀疑该瞬间滞后时,才用 mp_evaluate 跑 return getCurrentPages().slice(-1)[0].route 交叉校验,别默认每次都加这步。

参数:dataPaths 只取关键字段、避免大数组爆 token,支持点路径、数组下标(含负数如 [-1])、.length、以及通配 [*](如 ['conversationHistory[*].aiStatus','isSearching']);解析不到的路径会进返回里的 missingPaths。maxBytes 默认 50000,超出按字节截断并置 truncated=true,字节数见 bytes(字段名与 page_getData 一致)。connection 可选。

ParametersJSON Schema
NameRequiredDescriptionDefault
maxBytesNo
withDataNo
dataPathsNo
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。

TDQS

A4.4/5.0
Behavior4/5

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

No annotations provided; description compensates by discussing routing lag (snapshot behavior), truncation via maxBytes, and cross-validation with mp_evaluate. Does not explicitly state non-destructive nature but implies it. Lacks mention of error handling or permissions.

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

Conciseness4/5

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

Description is fairly long but well-structured with sections for purpose, usage, warnings, and parameter details. Front-loaded with main purpose. Could be slightly more concise but retains necessary detail.

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?

No output schema, but description mentions missingPaths and bytes without fully specifying return structure. For a tool of moderate complexity, it provides enough context for an agent, but explicit return format would improve completeness.

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?

Schema has 4 params with only 25% description coverage. Description adds meaning for dataPaths (path expressions, wildcards, missing), maxBytes (default 50000, truncation, bytes field), withData, and connection. Adequately compensates for low schema coverage.

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 gets current page info (path, query, size, scrollTop) and optionally page.data. It distinguishes from siblings like page_getData, page_expectRoute, page_waitRoute.

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 says when to use (概览 of route, size, scroll, partial data) and when to use alternatives (page_getData for data only, page_expectRoute/page_waitRoute for route assertion). Also warns about routing lag and not using right after navigation.

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

mp_diagnoseConnectionA

只读探测当前连接目标的状态(port 是否监听、devtools 是否在线、ws 是否可达、automator 是否已连),不启动 IDE、不重连、不改任何项目状态。

何时用:只想拿一份不改动现状的连接快照时(如用户问“为什么连不上”但不想动环境),或在 mp_ensureConnection / mp_recoverConnection 已失败后,用本工具读细节辅助判断。 何时不用:想“把连接弄通”时不要先调本工具——直接调 mp_ensureConnection,它会自愈/自动拉起 IDE,并在返回里自带一份 diagnosis。

⚠️ 本工具是保守设计:它如实报告 “port not listening / automation not enabled” 等,但不会修复。这种红色结果不是死路、也不需要找用户确认——下一步就是调 mp_ensureConnection 让它自动拉起/重连。

返回 JSON 含各探测项的布尔/状态字段;红色项只代表“当前未就绪”,不代表无法恢复。connection 可选,传入可临时覆盖 projectPath / wsEndpoint / mode / port 等连接参数,省略则用已配置的默认值。

ParametersJSON Schema
NameRequiredDescriptionDefault
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。

TDQS

A4.8/5.0
Behavior5/5

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

Without annotations, the description fully discloses behavior: does not modify state, does not start IDE, does not reconnect. Explains that red results are non-fatal and provides context for interpretation.

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?

Well-structured with sections: purpose, usage guidelines, warnings, return details. Every sentence adds unique value without redundancy.

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?

Despite no output schema, the description adequately describes return as JSON with boolean/status fields. Parameter description is thorough. Slightly more detail on output structure could improve completeness.

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 only parameter 'connection' is fully described in schema, but the tool description adds valuable context: overridable fields, port meaning, and warning about IDE service port confusion.

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 it is a read-only diagnostic tool that probes connection status (port, devtools, ws, automator). It explicitly distinguishes from siblings like mp_ensureConnection, which is used to fix connections.

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?

Provides explicit guidance on when to use (snapshot, after failures) and when not to use (when fixing is needed, direct to mp_ensureConnection). Also clarifies that red results are not dead ends and next steps.

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

mp_ensureConnectionA

确保小程序自动化会话就绪——这是连接链路的默认入口:在 mp_screenshot / page_* / element_* 之前先调它。它会自愈:会话未就绪时自动拉起微信开发者工具 / 重启 cli auto 并建立 automator 连接,不只是被动检查。

何时用:任何“先连上再操作”的场景,直接调本工具,不需要先 mp_diagnoseConnection(那是只读探测,可跳过)。 失败时:先读错误信息里的 Next step 引导,通常是 ① 带 reconnect=true 重试,或 ② 先 mp_listProjects 再带 projectSelection 重试——不要原样重试同一调用,也不要直接停下来找用户。

defaultProject 不在 recents 时,server 会用 defaultProject 重启 cli auto,第一次仍可能失败——此时按错误信息 retry 即可。

返回 JSON 含 mode / projectPath / defaultProjectPath / wsEndpoint / port / 内嵌 diagnosis / currentPage(已就绪可信,无需再调 mp_currentPage 校验)/ systemInfo。connect 模式无法确认 IDE 当前打开项目时 projectPath 会是 null,defaultProjectPath 仅表示持久化默认值,不会冒充当前项目。

参数:reconnect=true 强制丢弃现有会话重连(用于会话疑似失效/卡死);projectSelection 传 mp_listProjects 返回的 index / name / path 之一,用于在“需要选择项目”的提示后定向选中;所选路径会用于当前 ensure 并保存为默认项目,同名项目请用 index 或完整 path 消歧。connection 可选,覆盖默认连接参数。

ParametersJSON Schema
NameRequiredDescriptionDefault
reconnectNo
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。
projectSelectionNo

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description fully carries the burden. It discloses self-healing behavior, session management, retry logic, and details about the return JSON (e.g., projectPath being null in connect mode). No contradictions.

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 front-loaded with the core purpose, then usage, failure recovery, and parameter details. Each section adds value without unnecessary repetition despite the length.

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?

Given the tool's complexity, no annotations, and no output schema, the description covers purpose, usage, failure recovery, parameter semantics, and key return fields. It is sufficient for an agent to use correctly.

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 is only 33%, but the description compensates by explaining each parameter in context: reconnect forces discard and reconnection, projectSelection accepts index/name/path for disambiguation, and connection details fields with a caution about the port.

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 ensures a mini-program automation session is ready and identifies itself as the default entry point before screenshot/page/element tools. It distinguishes itself from mp_diagnoseConnection by noting that it is read-only and can be skipped.

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 says to call this tool before other actions and not to call mp_diagnoseConnection first. Provides failure handling guidance: retry with reconnect=true or list projects first, and warns against retrying the same call or stopping.

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

mp_evaluateA

向小程序 AppService 注入并执行一个函数,返回其结果。functionSource 必须是完整的 function 表达式字符串(如 function(){ return getCurrentPages().pop().data.ready }() => wx.getStorageSync('token')),不能是裸语句。函数体跑在 AppService 上下文,可用 getCurrentPages()、getApp()、wx 等全局;args 数组会按顺序作为函数入参展开。返回值经 JSON 序列化,别返回 DOM/句柄类不可序列化对象。

适合在 page.data 不稳定时显式读取 / 状态机断言 / 内联绕过 modal。可选 timeoutMs 覆盖默认 15s(上限 600s),用于长耗时异步。⚠️ 等任意条件请用 mp_pollUntil(内置 predicate 轮询,比 evaluate+waitTimeout+evaluate 手写循环稳);要调 wx.* API 用 mp_callWx。注意:函数体别遍历完整 prototype 链或做复杂反射,可能命中 SDK wrapper 抛 'Cannot read property is of undefined',保持函数体最小。

ParametersJSON Schema
NameRequiredDescriptionDefault
argsNo
maxBytesNo
timeoutMsNo
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。
functionSourceYes

TDQS

A4.8/5.0
Behavior5/5

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

No annotations provided, but description fully discloses execution context, global objects, JSON serialization of return, timeout defaults and limits, and potential errors (prototype chain issues).

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?

Well-structured: starts with core purpose, then usage guidelines, then warnings. Every sentence adds value despite length.

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?

Given 5 parameters, no output schema, and nested objects, description covers input constraints, behavior, return, timeout, and edge cases. Minor gap: maxBytes not mentioned.

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?

Schema coverage is 20% (only connection described). Description adds meaning for functionSource (full function expression), args (passed as arguments), timeoutMs (default and max), and connection (optional override). However, maxBytes parameter is not explained.

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?

Clear verb+resource: inject and execute a function in AppService, return result. Distinguished from siblings mp_callWx and mp_pollUntil by specifying alternate use cases.

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 states when to use (unstable page.data, state machine assertions) and when not (use mp_pollUntil for waiting, mp_callWx for wx.* APIs). Also warns against complex prototype traversal.

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

mp_generateScenarioReportA

执行一个 scenario(步骤定义与执行语义完全同 mp_runScenario:同样的 12 种 step、断言/动作 pass 规则、stopOnFailure 默认 true、selector 不穿透自定义组件等 — 先看 mp_runScenario 了解如何写 steps[]),并额外生成一份人可复核的 markdown 回归报告。只需要机器可读的 pass/fail 结果、不要报告时,用 mp_runScenario。

markdown 始终通过返回值的 report 字段回传(无论是否写盘);传 outputPath 时同时写入该路径(父目录自动 mkdir -p 创建)。

报告内容开关:includePassedSteps=false 只保留失败步(适合失败聚焦报告);includeSnapshots=false 从各步结果剥掉 data/elements/snapshot;includeLogs=false 剥掉 logs。title 为报告大标题(默认 'Scenario Report')。

返回 {ok, outputPath, title, totalSteps, executedSteps, passedSteps, failedSteps, report}。

ParametersJSON Schema
NameRequiredDescriptionDefault
stepsYes
titleNo
maxBytesNo
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。
outputPathNo
includeLogsNo
stopOnFailureNo
includeSnapshotsNo
scenarioTimeoutMsNo
includePassedStepsNo

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool runs actual scenario steps (with side effects like navigation and input), that stopOnFailure defaults true, that markdown is always returned in the 'report' field, and specifies the return object fields. However, it does not explicitly state that the tool is destructive or that it requires an active connection, though these are implied. Slight gap but still transparent.

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

Conciseness4/5

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

The description is well-structured, front-loading the main purpose and sibling distinction, then explaining output mechanics, report content switches, and return format. Each sentence adds value, though it is relatively long. It could be slightly more concise but is clear and logically organized.

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?

Given the tool's complexity (10 parameters, nested objects, no output schema), the description is fairly complete. It covers purpose, usage, parameter semantics, and return format. It lacks explicit error handling or details about the 'ok' field, but the essential context for correct invocation is present. High completeness for a complex 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?

Schema description coverage is only 10% (only connection described in schema). The description compensates by explaining the meaning of steps (reference to mp_runScenario), title, outputPath, includePassedSteps, includeSnapshots, includeLogs, and stopOnFailure default. It does not detail maxBytes or scenarioTimeoutMs, but overall adds significant 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 that the tool executes a scenario (same steps as mp_runScenario) and additionally generates a Markdown regression report. It explicitly distinguishes from mp_runScenario by stating when to use each, e.g., '只需要机器可读的 pass/fail 结果、不要报告时,用 mp_runScenario.' This provides clear purpose and sibling differentiation.

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?

The description gives explicit when-to-use and when-not-to-use guidance by comparing with mp_runScenario. It explains the meaning of report content parameters (includePassedSteps, includeSnapshots, includeLogs) and output behavior (report always returned in 'report' field, optional file write with parent directory creation). This covers usage context comprehensively.

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

mp_getLogsA

读取当前连接目标的小程序控制台日志,支持过滤。不同项目 / wsEndpoint 的持久化日志会隔离,不会混读或互相清空。常见用法:操作前用 clear=true 清空当前目标缓冲,操作后再读以拿到本次产生的日志。

过滤参数:

  • contains:子串匹配(对 message + 序列化后的 data 一起匹配,非正则)。

  • type:按级别过滤,枚举 log/info/warn/error/exception(exception 是未捕获异常,区别于 console.error)。

  • since:相对时间窗口,单位毫秒 —— 只返回过去 N ms 内的日志(不是绝对时间戳)。

  • limit:最多返回条数,默认 100,取最新的 N 条

返回 {count, totalCount, logs[], filters, listenerAttached...}:count 是过滤后条数,totalCount 是当前目标缓冲区总条数(count<totalCount 说明被 limit/过滤截断)。listenerAttached=false 说明日志监听没挂上,可能漏日志,需 mp_recoverConnection。clear=true 只清空当前连接目标的缓冲。

ParametersJSON Schema
NameRequiredDescriptionDefault
typeNo
clearNo
limitNo
sinceNo
containsNo
maxBytesNo
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。

TDQS

A4.6/5.0
Behavior5/5

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

Despite no annotations, the description discloses isolation by project/wsEndpoint, clear behavior (only current buffer), return fields with meaning of count/totalCount, and the listenerAttached flag indicating potential log loss. This is comprehensive.

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

Conciseness4/5

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

Well-structured with purpose, usage, parameter details, and return format. Slightly verbose but all information is valuable and front-loaded.

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?

Covers purpose, parameters, usage, return object, and edge cases (listenerAttached). No output schema exists, but return values are described. Complete for the tool's complexity.

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?

Schema coverage is low (14%), but the description explains all parameters in detail: contains substring matching, type enum values, since as relative ms, limit defaults, clear behavior, and connection object. Adds significant meaning beyond 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 it reads applet console logs with filtering support. It is distinct from sibling tools, which are primarily for element or page interactions.

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?

Provides a common usage pattern (clear buffer before operation, read after). Does not explicitly state when not to use, but given it is the only log-reading tool, the context is clear.

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

mp_healthCheckA

只读聚合当前自动化环境健康状态:连接(devtoolsOnline / wsReachable / automatorConnected)、当前页面路由、项目、日志监听、以及上次 mp_screenshot 结果(lastScreenshotOk / errorCode)。不修复任何东西——要恢复用 mp_recoverConnection,要建立连接用 mp_ensureConnection。

何时用:操作出问题时先调它看全局状态;尤其在 mp_screenshot / page_snapshot 反复失败后,先 healthCheck 再决定是否 mp_recoverConnection。 关键字段:summary='degraded' 表示至少一项能力降级,但不一定可通过重连修复;只有 needsRecovery=true 才调 mp_recoverConnection。连接全绿但 lastScreenshotOk=false 时会返回 summary='degraded' + needsRecovery=false,说明是截图通道降级,不要循环重连。

serverVersion 是本 MCP server 的版本号(不是小程序版本、不是基础库版本、不是开发者工具版本),反馈/调试时带上它即可。

参数:includePage=true 额外探当前路由,includeLogs=true 额外查日志监听状态(都默认 true;探测失败只会进 warnings,不影响其余字段)。connection 可选,覆盖默认连接参数。

ParametersJSON Schema
NameRequiredDescriptionDefault
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。
includeLogsNo
includePageNo

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: it is read-only, does not fix anything, explains key fields like needsRecovery, and warns about serverVersion meaning. It also mentions potential warnings from failed probes. This sets clear expectations.

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

Conciseness4/5

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

The description is fairly long but well-structured with sections. It front-loads the essential purpose and usage. While every sentence adds value, some redundancy exists (e.g., repeating '不修复任何东西'). Could be slightly tighter, but still effective.

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?

Given the tool's complexity (health check with multiple fields) and no output schema, the description thoroughly explains return fields (summary, needsRecovery, lastScreenshotOk, etc.), edge cases (degraded but no recovery), and parameter behavior. It is complete for an agent to use correctly.

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?

The description adds significant meaning beyond the schema. It explains the default values and effects of includeLogs and includePage, and details the connection parameter including the port warning. Schema coverage is low (33%), but the description compensates fully.

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 it is a read-only aggregation of automation environment health status, listing specific components it checks (connections, page route, project, logs, last screenshot result). It distinguishes from sibling tools like mp_recoverConnection and mp_ensureConnection by stating it does not fix anything.

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?

The description provides explicit when-to-use guidance: '操作出问题时先调它看全局状态' and after repeated screenshot failures. It also clarifies when not to use mp_recoverConnection (only when needsRecovery=true) and warns against looping reconnect. This is comprehensive.

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

mp_listProjectsA

列出微信开发者工具里的最近项目(返回 { defaultProject, projects:[{index,name,path}] }),并显示当前 defaultProject。

何时用:① mp_ensureConnection 返回“需要选择项目”提示后,先调本工具看有哪些项目,再把某项的 index / name / path 作为 projectSelection 传回 mp_ensureConnection;② 想固定后续连接用哪个项目时,把 path 传给 mp_setDefaultProject;③ 不确定有哪个项目可连时先调它确认。

注意:返回的是“可连接的项目”,不是项目内的页面路由——要找页面路径需读项目的 app.json,本工具不提供。无参数。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the return structure, confirms no parameters, and warns about what it does not do. It implies a read-only operation (listing), but does not explicitly state side effects or read-only nature. Still, it is very transparent.

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 well-structured, front-loading the return structure and then explaining usage. Every sentence is informative and earns its place. 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.

Completeness5/5

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

For a simple no-parameter list tool, the description covers all necessary context: what it returns, how to use it in workflows with sibling tools, and what it does not provide. It is complete given the tool's complexity and lack of output schema.

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?

There are no parameters, and the description explicitly confirms this, adding value beyond the empty schema. The baseline for zero parameters is 4, and the description meets it.

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 it lists recent projects from WeChat DevTools and specifies the return structure. It distinguishes from sibling tools like mp_ensureConnection and mp_setDefaultProject by explaining how they relate, and notes it does not provide page routes, setting it apart from page-level tools.

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?

The description provides three explicit scenarios for when to use this tool: after mp_ensureConnection prompts for project selection, to fix default connection, or to check available projects. It also clarifies when not to use it (for page routes) and suggests alternatives (mp_ensureConnection, mp_setDefaultProject).

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

mp_navigateA

在小程序内导航并返回导航后的 activePage(path+query)。返回的 activePage 是这次导航 resolve 的真实当前页,可直接信任,无需再调 mp_currentPage 或 mp_evaluate 交叉校验路由。

transition 怎么选:

  • navigateTo(默认):压栈打开新页,可 navigateBack 返回。

  • redirectTo:关掉当前页再打开,不入栈。

  • reLaunch:关掉所有页栈后打开(回首页 / 重置状态用)。

  • switchTab:仅用于 app.json tabBar 里注册的 tab 页,且不支持 query;跳非 tabBar 页会报 'can not switch to no-tabBar page' —— 这种情况改用 navigateTo。(不确定哪些是 tab 页时,custom-tab-bar 项目 tabBar 可能为空,需查 app.json 的 tabBar.list 或 pages。)

  • navigateBack:返回上一页,此时整个省略 path(切勿传空字符串 ""——会被 schema 当作非法 path 拒绝);其余 transition 都必须传 path。

query 用 query 参数传(对象,如 {id:'1'}),会自动拼到 url,不要手动拼进 path;switchTab 除外。

⚠️ waitMs 是 dumb sleep,不是等条件。时序敏感场景(onShow 鉴权 / SSE 初始化 / 异步 setData)建议 waitMs 留小(如 500 给 transition 过渡),再用 mp_pollUntil 等具体条件就绪。若 waitMs 阶段超时,错误里会带 currentRoute 帮你判断导航是否其实已生效。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
queryNo
waitMsNo
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。
transitionNonavigateTo

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: navigation stack behavior, query handling, the nature of waitMs as a 'dumb sleep', error handling with currentRoute, and the reliability of the returned activePage. No contradictions present.

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

Conciseness4/5

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

The description is well-structured with sections and bullet points, but slightly lengthy. It front-loads the main purpose and each sentence adds value, though minor redundancy could be trimmed.

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?

Given 5 parameters, no output schema, and complex behaviors, the description covers all aspects: parameter details, edge cases (switchTab without query, navigateBack path omission), return value, and references to sibling tools. It is comprehensive and actionable.

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 description coverage is only 20%, but the description adds extensive meaning for all parameters: path (omit for navigateBack), query (object, not hand-stitched), waitMs (dumb sleep, not condition), connection (nested object details), and transition (enum meanings with examples). This compensates fully.

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: navigate within a mini-program and return the resulting activePage. It distinguishes from siblings like mp_currentPage and mp_evaluate by explaining that the returned page is trustworthy and eliminates the need for cross-validation.

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?

The description provides explicit guidance on when to use each transition type (navigateTo, redirectTo, reLaunch, switchTab, navigateBack), including scenarios where switchTab fails and alternatives like navigateTo. It also advises on using mp_pollUntil for condition-based waits instead of waitMs.

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

mp_pollUntilA

通用 wait-for-condition / waitData 工具:轮询执行 predicate(返回任意真值即命中)直到命中或超时,可选在命中后执行 action,并按 snapshotPaths 拍 before/after 快照。典型场景:等 page.data 某字段变化(predicate 写 function(){ return getCurrentPages().pop().data.conversationHistory.length === 1 })、等异步状态切换、等 SSE 流式中段、时序敏感打断。

predicate / action 是 function 源码字符串,跑在 AppService(可用 getCurrentPages、wx 等);predicateArgs / actionArgs 是按顺序展开给这两个函数的入参数组。轮询由 server 端管理,重连不留脏 setInterval。

predicate 与 dataPath 二选一:若该环境 evaluate 注入通道不可用(对任意函数都报 'is not a function'),改用 dataPath 直接轮询 page.data 的某条路径(SDK 端单路径投影,不走 evaluate)——dataEquals 省略时按真值命中、给了则与该值 deep-equal 命中(可精确等 false/0/null)。注意:命中后的 action 仍走 evaluate,evaluate 不可用时只用 dataPath+snapshotPaths(snapshot 读 page.data、不依赖 evaluate)。

snapshotPaths 走点路径取值,支持 [N] 下标、负索引、[*] 通配(如 conversationHistory[*].aiStatuslist.length);before = predicate 命中时刻的 page.data,after = action 跑完且等 snapshotAfterMs 后的 page.data(snapshotAfterMs 给异步 setData 留时间,默认 0,上限 60000,仅在传 snapshotPaths 时有效)。结果超过 maxBytes(默认 50000B)会截断。

注意:timeoutMs(默认 15s,上限 600s)是 predicate、action、等待和快照的整体预算;若比单次 evaluate 还短,可能只跑 1 次 predicate 就超时。

ParametersJSON Schema
NameRequiredDescriptionDefault
actionNo
dataPathNo
maxBytesNo
predicateNo
timeoutMsNo
actionArgsNo
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。
dataEqualsNo
predicateArgsNo
snapshotPathsNo
pollIntervalMsNo
snapshotAfterMsNo

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: polling mechanism, predicate/action as function strings, dataPath fallback, snapshot feature with before/after, timeouts, size limits, and connection handling. It warns about edge cases like timeout being too short or evaluate unavailability.

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

Conciseness4/5

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

The description is lengthy but well-structured with markdown formatting and front-loaded summary. While there is some redundancy, it remains organized and each sentence adds value given the tool's complexity.

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?

Given 12 parameters, no output schema, and high complexity, the description is remarkably complete. It covers all major behaviors, parameter interactions, fallback logic, and edge cases, leaving little ambiguity for the agent.

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 is only 8%, but the description adds extensive meaning to all 12 parameters: explains predicate/action as source strings, dataPath for direct polling, dataEquals for exact match, snapshotPaths with wildcard syntax, and parameter interactions. This compensates fully for the low schema coverage.

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 it is a '通用 wait-for-condition / waitData 工具' and lists typical scenarios like waiting for page.data field changes, async state switches, and SSE streaming. It distinguishes itself from sibling tools like page_waitElement and page_waitRoute by being a generic polling tool that can use predicates or data paths.

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 provides good guidance on when to use predicate vs dataPath (when evaluate is unavailable), typical scenarios, and constraints like timeoutMs and maxBytes. However, it does not explicitly compare to sibling wait tools, so usage context is clear but not exhaustive.

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

mp_recoverConnectionA

按标准顺序修复一个已存在但降级/失效的连接:重建 automator 会话 → 重挂日志监听 → 恢复项目上下文,并返回恢复前后对比。

何时用:这是升级修复步——只有当 mp_healthCheck 显示 needsRecovery=true 时调它,而不是只看 summary='degraded' 就重连。 何时不用:首次“建立连接”不要用本工具,用 mp_ensureConnection(它才负责自动拉起 IDE);连接全绿但截图失败且 needsRecovery=false 时也不要用,重连无法修复截图通道。与 ensure(reconnect=true) 的区别:本工具跑一套有序修复并报告 before/after,ensure 只是把会话弄就绪。

⚠️ 副作用(launch 模式):重连会退出并重新 launch 小程序(App.exit + 关 IDE 窗口 → cli auto 冷启),页面栈被重置回项目的启动/入口页 —— 当前所在页 / reLaunch 的现场会丢失。所以仅在连接确实降级失效(needsRecovery=true)时用;若只是想保留当前页、连接其实没坏,不要用本工具。connect 模式(配置了 wsEndpoint)只断开重连 WS、不重启小程序,不丢页。

返回 JSON 含 ok / recovered、actions、before/after 状态、health.summary、warnings/errors。recovered=true 只表示连接恢复完成;若历史截图仍失败,health.summary 会保持 degraded 但 needsRecovery=false。recovered=false 说明连接修复未完成——此时不要无限重试,确认开发者工具确实在运行,必要时反馈给用户。

参数:reconnect 默认 true(丢弃旧会话重连);设 false 仅在不想强制重连、只想跑其余修复步骤时用。connection 可选,覆盖默认连接参数。

ParametersJSON Schema
NameRequiredDescriptionDefault
reconnectNo
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。

TDQS

A4.9/5.0
Behavior5/5

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

Since no annotations are provided, the description fully covers behavioral traits. It explains side effects in launch mode (app exit and relaunch, loss of current page stack) versus connect mode (only WS reconnection). It also clarifies the meaning of recovery results, warnings about infinite retries, and the conditions under which health may remain degraded.

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

Conciseness4/5

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

The description is fairly long but well-structured with clear sections. Each sentence contributes meaningful information, and the structure aids readability. It could be slightly more concise, but the complexity of the tool justifies the length.

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?

The description is highly complete given the tool's complexity. It explains the return JSON structure, the meaning of recovery flags, and provides guidance on handling failures. It also addresses edge cases and potential pitfalls, leaving little ambiguity for the agent.

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?

The description adds significant meaning beyond the input schema. It explains the default value and purpose of the reconnect parameter, and provides detailed explanations for fields in the connection object, including warnings about the port parameter. This is especially valuable given the nested object and the need to clarify parameter usage.

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 repair an existing but degraded or failed connection by following a standard sequence of steps. It explicitly lists the actions (rebuild automator session, remount log listener, restore project context) and mentions that it returns a before/after comparison. This differentiates it from sibling tools like mp_ensureConnection and mp_diagnoseConnection.

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?

The description provides explicit guidance on when to use this tool (only when mp_healthCheck shows needsRecovery=true) and when not to use it (for first-time connections, or when needsRecovery=false). It also distinguishes between this tool and others like mp_ensureConnection and the ensure(reconnect=true) variant, clearly specifying the appropriate contexts.

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

mp_runScenarioA

按顺序执行一组小程序调试/回归步骤,一次调用跑完并汇总每步 pass/fail。用于把一条短链路脚本化复跑(导航→操作→断言);只做单次交互探查请用单个 page_*/element_* 工具。要把结果整理成 markdown 复核产物时改用 mp_generateScenarioReport(参数相同)。

steps[] 每项必带 type,最多 25 步,共 12 种(分动作类与断言类): ● 动作类(不返回 pass,只在抛错时算失败):

  • navigate {path?, query?, transition?=navigateTo|redirectTo|reLaunch|switchTab|navigateBack, waitMs?} — 只有 navigateBack 可省略 path;waitMs 是 dumb sleep,时序敏感场景宁可用 waitRoute 步或拆出来用 mp_pollUntil

  • tap {selector, innerSelector?, waitMs?}

  • input {selector, innerSelector?, value(string|number)}

  • snapshot {selectors?[], dataPaths?[], withData?=false, withElements?=true, withWxml?=false, limit?=10, maxBytes?=50000} — 每个 selector 受 limit 限制,所有 selector 合计最多汇总 100 个元素摘要;超 maxBytes 会截断并返回 note;比独立 page_snapshot 弱

  • getLogs {clear?, contains?, logType?, since?, limit?=100}

  • screenshot {path?, timeoutMs?=30000} — 不传 path 时不回传 base64(只给 note),要图请单独调 mp_screenshot 或传 path 存文件;连续 2 次截图通道失败后会短路 ● 断言类(决定 scenario 整体 ok/pass):

  • waitRoute {path, timeout?=5000, retryInterval?=200} — 轮询直到 route 命中,返回 matched

  • expectRoute {path} — 即时断言当前 route

  • expectVisible {selector} — 命中 ≥1 个即过

  • expectText {selector, expected, mode?=equals|includes}

  • expectCount {selector, expected(整数)}

  • expectData {path, expected} — 必须显式给 expected;path 未解析到值且 expected 省略时直接判失败(避免 undefined===undefined 静默判过)

⚠️ selector 用 page.$ / page.$$,不穿透自定义组件内部;组件内元素用 innerSelector(在父元素内再查),取第 N 个匹配用 selector[index=N] 语法。 ⚠️ 想要真正验证就必须放至少一个断言步:纯动作步全部不抛错也只代表跑通了,ok=true 不等于断言通过。

stopOnFailure 默认 true:遇到首个失败步即停,后续步不执行;设 false 跑完所有步再汇总。scenarioTimeoutMs 控制整体预算,默认 120000ms、最大 600000ms。maxBytes 控制聚合结果大小,默认 500000B。

建议每个 scenario 保持短(≤ ~10 步):snapshot/screenshot 在长链路后段更易超时/抖动 — 拆成多个短 scenario 分段跑。

返回 {ok, totalSteps, executedSteps, passedSteps, failedSteps, results[]},每个 result = {index, type, pass, step, result 或 error}。

ParametersJSON Schema
NameRequiredDescriptionDefault
stepsYes
maxBytesNo
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。
stopOnFailureNo
scenarioTimeoutMsNo

TDQS

A4.7/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses extensive behavioral traits: step types (action vs assertion), return value structure, selector limitations (no custom component penetration, innerSelector, index syntax), screenshot not returning base64 without path, snapshot being weaker, channel failure short circuit, and timeout boundaries. Some details are buried, but overall transparent.

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

Conciseness4/5

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

The description is well-structured with bullet points and sections (action vs assertion, warnings at end), but it is lengthy and contains some redundancy (e.g., maxBytes mentioned twice). It is front-loaded with purpose but could be slightly more concise without losing detail.

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?

Given the complexity (5 top-level parameters, nested step schemas, no output schema), the description is thorough. It explains all step types, return value, edge cases, and relationships with sibling tools. No missing critical information for agent invocation.

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 description coverage is only 20% (only 'connection' has a description), but the tool's description adds immense value by enumerating all 12 step types with their parameters, defaults, and behavior. It compensates fully for the schema gaps, explaining each parameter's meaning beyond the schema definitions.

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 it executes a set of debug/regression steps sequentially, summarizes pass/fail per step, and distinguishes itself from single-use tools like page_*/element_* and from mp_generateScenarioReport for markdown output. The verb 'runScenario' and resource 'scenario' are well-defined.

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 states when to use (scripting a short chain of navigation->action->assertion) and when not to use (single interaction: use individual tools; generating report: use mp_generateScenarioReport). Also provides constraints like max 25 steps, suggests ≤10 steps for reliability, and clarifies stopOnFailure behavior.

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

mp_screenshotA

截取当前小程序视口截图。需已有活动会话(无会话先 mp_ensureConnection)。不传 path 返回内联图片(image content);传 path 则存文件并返回 JSON {ok,path,route} —— 此时拿不到图像本身,route 为可空诊断字段。 父目录不存在会自动 mkdir -p;文件模式会验证输出存在且非零字节后才返回成功。

⚠️ 截图是单通道串行能力:全局一次只跑一个,不要并发拍图;超时后也不要立刻重发(底层那条超时请求仍占着单通道,再发会互相打乱)—— 等本次调用返回再说。截图前不会额外读取 currentPage,避免非必要请求先占住截图通道。仅支持开发者工具模拟器(客户端环境可能返回 EMPTY_OUTPUT)。

失败时返回 reasonCode 并附可操作建议:SCREENSHOT_TIMEOUT、SIMULATOR_HIDDEN、RENDERER_NOT_READY、LOCAL_OUTPUT_ERROR、EMPTY_OUTPUT、UNKNOWN。只有 RENDERER_NOT_READY 会自动重试一次;本地输出错误不会计入截图通道连续失败。连续 2 次拿不回帧后,后续截图会直接返回 SCREENSHOT_UNAVAILABLE 跳过;确认环境恢复后传 force:true 再试。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
forceNo
timeoutMsNo
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。

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries full burden and excels: it discloses single-channel serial execution (no concurrency), timeout handling, failure reason codes with actionable advice, auto-retry only for RENDERER_NOT_READY, error counting leading to SCREENSHOT_UNAVAILABLE, and the effect of force. It also states that it does not read currentPage to avoid blocking the channel. This is comprehensive behavioral transparency.

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

Conciseness4/5

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

The description is fairly long but each sentence adds value. It is well-structured with warnings in bullet-style and a clear list of error codes. The main purpose is front-loaded, and details are organized logically. Slightly verbose but not wasteful.

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?

Given the tool's complexity (multiple modes, error handling, concurrency constraints, no output schema), the description covers all critical aspects: input/output behavior, error codes and their meaning, auto-retry logic, error counting with force flag, environment limitations, and prerequisite checks. An agent can make an informed decision without additional info.

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?

Schema coverage is only 25%, so the description must compensate. It thoroughly explains 'path' (inline vs file storage) and 'force' (reset error counter). 'timeoutMs' and 'connection' are not explained in the description, but 'connection' has a detailed description in the schema. The description adds significant meaning beyond the schema for the two key parameters.

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 action ('截取当前小程序视口截图') and resource, distinguishing it from all sibling tools (none of which are screenshot-related). It also explains two operational modes depending on the 'path' parameter, providing full clarity.

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 provides explicit when-to-use guidance: requires an active session (referencing mp_ensureConnection), warns against concurrency due to single-channel serialization, advises not to resend after timeout, and notes it only works in devtools simulator. It also explains the force flag for recovery. While it doesn't explicitly name alternatives, no other screenshot tool exists, so the guidance is sufficient.

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

mp_setDefaultProjectA

把指定项目设为持久化的默认项目;设置后下次 mp_ensureConnection 会优先用它连接。本工具只写默认值,不会自己建立连接

何时用:只想修改后续连接默认项目、暂时不建立连接时。projectPath 传 mp_listProjects 返回的 projects[].path(项目目录绝对路径);路径无效或目录不存在会返回错误,不会静默成功。 与 mp_ensureConnection 的 projectSelection 区别:projectSelection 会在当前 ensure 调用里立即选中并连接该项目,同时也保存为默认项目;本工具只保存默认项目。设完需再调 mp_ensureConnection 才真正连上。

ParametersJSON Schema
NameRequiredDescriptionDefault
projectPathYes

TDQS

A4.9/5.0
Behavior5/5

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

Discloses that it does not establish a connection on its own, only sets the default, and that invalid or non-existent paths return errors. With no annotations provided, the description fully covers behavioral traits.

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

Conciseness4/5

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

The description is well-structured into logical segments (purpose, usage, parameter details, distinction) but is slightly verbose. It effectively front-loads the core message.

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?

Given no output schema and no annotations, the description provides comprehensive context: behavior, parameter usage, error handling, and relationship to sibling tools. No gaps remain.

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?

Despite 0% schema description coverage, the description adds critical meaning: projectPath is an absolute directory path from mp_listProjects projects[].path, and invalid values result in errors. This compensates fully for the lack of schema 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 sets a persistent default project, using specific verbs ('set' and 'default project'), and distinguishes it from sibling mp_ensureConnection by emphasizing it only writes the default without establishing a connection.

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 indicates when to use: when only modifying the default project for future connections and not establishing a connection now. Contrasts with mp_ensureConnection's projectSelection and specifies that projectPath should come from mp_listProjects' output.

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

page_callMethodA

调用当前页面实例上暴露的方法(等价 page.callMethod(method, ...args),会 await 结果)。args[] 按位置展开为实参(非命名参数;传一个对象就是第一个位置参数)。返回 {method,arguments,result},result 为方法返回值。何时用:触发页面真实逻辑(优于直接 page_setData 改状态);调组件实例方法用 element_callMethod。方法不存在或内部抛错会以 UserError 返回失败信息。

ParametersJSON Schema
NameRequiredDescriptionDefault
argsNo
methodYes
maxBytesNo
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。

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description discloses key behaviors: the call is awaited, args are positional, return structure includes method/arguments/result, and errors return UserError. However, it does not mention potential side effects on page state, though this might be implicit for method calls.

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

Conciseness4/5

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

The description is concise (about 120 characters) and front-loads the main action. It could be more structured, but it avoids redundancy and waste.

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?

Given no output schema, the description covers the return structure and error handling. It distinguishes from sibling tools and explains usage context. Missing details on maxBytes and connection semantics slightly reduce completeness.

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?

Schema description coverage is only 25% (only connection field described). The description adds meaning: args are positional (not named), method is the method name. But it does not explain maxBytes or connection in detail beyond the schema, leaving some parameters under-documented.

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 'calls a method exposed on the current page instance' and explicitly distinguishes from the sibling 'element_callMethod' for component instances. The verb 'call' and resource 'page method' are specific.

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?

The description provides explicit guidance: use when triggering real page logic (better than page_setData) and use element_callMethod for component methods. It also mentions error handling with UserError for missing methods or internal errors.

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

page_expectCountA

一次性断言匹配选择器的元素数量是否「精确等于」expected(基于 page.$$,不是 >=)。支持 selector[index=N],此时命中该索引计 1、越界计 0。不抛错——结果在返回的 {pass,expected,actual,snapshot:{selector,index}} 的 pass 里,失败看 actual。⚠️ page.$$ 默认不穿透自定义组件(是否穿透取决于组件 styleIsolation/addGlobalClass,可用 page_getElements 看实际命中数判断),组件内部的元素不计入,会偏少。

ParametersJSON Schema
NameRequiredDescriptionDefault
expectedNo
selectorYes
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。

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it does not throw errors, returns result in {pass,expected,actual,snapshot} format, and explains page.$$ limitations regarding custom components. The index behavior is also clearly documented.

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

Conciseness4/5

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

The description is one dense paragraph. It front-loads the core purpose and then covers nuances. While it is concise and contains no fluff, it could benefit from slight structuring (e.g., separate lines for usage vs. behavior).

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?

Given no output schema and the complexity of the tool (selector indexing, custom component isolation, non-throwing behavior), the description is remarkably complete. It covers edge cases, return structure, and side effects, ensuring an agent can use it correctly.

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?

Schema coverage is low (33%, only 'connection' has description). The description adds meaning for 'selector' (index syntax, page.$$ behavior) and 'expected' (exact count, not >=). For 'connection', the schema already has a detailed description, so no duplication needed. Overall, it compensates for missing schema 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 explicitly states the tool asserts that the count of elements matching a selector exactly equals 'expected'. It uses specific verb ('断言...数量是否精确等于') and resource ('匹配选择器的元素'), distinguishing it from sibling tools like page_expectVisible or page_expectData.

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?

It explains when to use: for exact count assertion, not >=. It details special selector syntax (selector[index=N]) and behavior (index out of bounds counts 0). It warns that page.$$ does not penetrate custom components, guiding the user to avoid inaccurate counts.

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

page_expectDataA

一次性断言当前页面某个 data 路径的值是否与 expected 深度相等。expected 为必填——省略会抛错(早期省略会让缺失路径与 undefined 误判为相等而静默判过,故强制传)。返回 {pass,expected,actual,pathResolved,snapshot:{path}}:读 pass;pathResolved(=actual 是否 !==undefined) 用来区分「路径不存在」与「值确实是 undefined」。对象键插入顺序不影响比较结果。结果超过 maxBytes(默认 50000B)会截断。path 为单条点/方括号路径(如 user.profile.namelist[0].id),不支持 page_getData 的 [*] 通配投影。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
expectedYes
maxBytesNo
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。

TDQS

A4.2/5.0
Behavior4/5

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

No annotations present, but description thoroughly explains return value structure, path resolution behavior, truncation at maxBytes, and object key order insensitivity. Also mentions error case for omitted expected.

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

Conciseness4/5

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

Description is dense with relevant information, front-loaded with purpose, and each sentence adds value. Slightly long but efficient given complexity.

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?

No output schema, but description fully explains return object fields (pass, expected, actual, pathResolved, snapshot). Covers all parameters, error handling, comparison behavior, and truncation. Well-rounded for a tool of this complexity.

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?

Schema coverage is low (25%) but description compensates by explaining path (single, no wildcard), expected (required, deep equality), maxBytes (default 50000), and connection (optional override with field details).

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 the tool performs a one-time assertion on a data path value using deep equality. It distinguishes itself from siblings like page_getData (retrieval) and other page_expect* tools by focusing on data path assertion.

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?

Provides context on required expected parameter and why (previous silent failures), and specifies path format limitations. However, it lacks explicit guidance on when to use this tool vs alternatives like page_getData for inspection.

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

page_expectElementTextA

一次性断言元素文本(element.text(),含子节点渲染文本,非 input 的 value)是否匹配预期。mode='equals'(默认,整串精确相等) 或 'includes'(子串包含)。返回 {pass,expected,actual,snapshot:{selector,mode}}——读 pass,失败时看 actual 排查。结果超过 maxBytes(默认 50000B)会截断。⚠️ 与 page_expectVisible/Count 不同:元素不存在时本工具抛错(而非返回 pass:false)。支持 selector[index=N](0 基)。校验 input/textarea 的输入值请改走 element 取 value,不要用本工具。

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoequals
expectedYes
maxBytesNo
selectorYes
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。

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: error on missing element (contrasting with siblings), result truncation beyond maxBytes, mode behavior, return object fields (pass, expected, actual, snapshot). It also warns against misuse for input values, ensuring the agent understands invocation constraints.

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

Conciseness4/5

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

The description is a single paragraph but front-loaded with main assertion and mode details. Every sentence adds value, covering return format, truncation, edge cases, and cautions. Slightly dense but not overly verbose; could be split for readability but still efficient.

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?

Given 5 parameters, no output schema, and no annotations, the description is exceptionally complete. It covers purpose, all parameters with semantics, behavioral traits (error on missing element, truncation), return structure, and usage guidelines for distinguishing from siblings. An agent can reliably invoke this tool based on the description alone.

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 description coverage is low (20%). The description compensates thoroughly, explaining mode, expected, maxBytes purpose, and selector syntax (including index[N] usage). It adds practical meaning beyond the schema, especially for selector and mode, and clarifies that connection parameter's description is already in 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 that the tool asserts element text matches expected, with specific details on mode (equals/includes) and contrast with page_expectVisible/Count for missing elements. It explicitly distinguishes from input value checking, making the purpose unambiguous.

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 provides clear context for when to use (asserting element text) and when not to use (input/textarea values, recommending element.get value instead). It also explains mode options but lacks explicit 'use this tool when' vs 'use sibling when' structure, though behavioral contrasts with page_expectVisible/Count offer practical guidance.

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

page_expectRouteA

一次性断言当前页面路径是否等于预期值(不轮询、不抛错——失败返回 pass:false)。返回 {pass,expected,actual,snapshot:{path,query}},读 pass 判断结果。path 须与 page.path 同形:无前导 /、不含 query。若路由可能尚未稳定,先用 page_waitRoute 等到再断言。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
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。

TDQS

A4.9/5.0
Behavior5/5

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

Discloses all key behaviors: no polling, no error thrown, return format, path formatting requirement (no leading slash, no query). Without annotations, this fully informs agent of tool's 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?

Three concise sentences covering purpose, return value, and usage caveats. No wasted words, front-loaded.

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?

Given two parameters and no output schema, the description fully covers what, how, return format, preconditions, and alternatives. Complete for agent to select and invoke correctly.

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?

Adds meaning for 'path' parameter beyond schema by specifying formatting constraints. The 'connection' parameter already has schema description, so description adds less value there overall.

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 it's a one-time assertion for page path equality, with explicit behavior (no polling, no error thrown, returns pass:false on failure). It distinguishes from sibling tools like page_waitRoute.

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?

Provides direct when-to-use guidance: if route may be unstable, use page_waitRoute first. Also implies single check, not polling.

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

page_expectVisibleA

一次性断言选择器能否在页面定位到元素(基于 page.$$ 命中数 > 0,或带 [index=N] 时该索引在范围内)。⚠️ 只判「存在/可定位」,不检查视觉可见性(不看 display/opacity/视口)。不轮询、不抛错——结果在返回的 {pass,expected:true,actual,snapshot:{selector,count,index}} 的 pass 里。⚠️ page.$$ 默认不穿透自定义组件(是否穿透取决于组件 styleIsolation/addGlobalClass,可用 page_getElements 看实际命中数判断),组件内部元素会误判 pass:false,此类用 element_getInnerElements 校验。支持 selector[index=N](0 基)。

ParametersJSON Schema
NameRequiredDescriptionDefault
selectorYes
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。

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description fully carries the burden of behavioral disclosure. It states that the tool does not check visual visibility, does not poll, never throws errors, and returns a specific shape ({pass, expected, actual, snapshot}). It also discloses the limitation regarding custom component penetration.

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

Conciseness4/5

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

The description is relatively long but every sentence adds important information. It is front-loaded with the core purpose. Minor redundancy could be trimmed, but overall it's well-structured and concise for the amount of detail provided.

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?

Given no annotations or output schema, the description is fairly comprehensive. It covers purpose, behavior, return format, and limitations. It could be improved by explicitly listing all return fields, but the snapshot structure is hinted. The connection parameter is not justified in the description.

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 description adds meaning to the 'selector' parameter by explaining how it works (based on page.$$ hit counts and optional [index=N] syntax). The 'connection' parameter is already described in the schema, but the description does not add extra semantics for it. Overall, it compensates for missing schema description on the required 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?

The description clearly states the tool's purpose: an assertion for whether a selector can locate elements on the page, based on page.$$ hit count or index range. It distinguishes itself from sibling tools like page_expectCount, page_expectElementText, etc., by focusing specifically on existence/locatability.

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?

The description explicitly explains when to use this tool (for existence checks only) and when not to use it (e.g., for visual visibility or for elements inside custom components). It provides alternatives: 'element_getInnerElements' for inner component elements, implying other tools for visual checks.

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

page_getDataA

获取当前页面的数据对象。三种模式:1) 无参 → 返回整树(小心 token 限制);2) 传 path → 返回单个子路径;3) 传 paths[] → 按多路径投影(推荐用于大对象,支持 conversationHistory[*].aiStatus 这种 wildcard 语法、conversationHistory.lengthconversationHistory[-1].aiStatus 负索引)。默认 maxBytes=50000 字节硬截断,超出返回 truncated=true 标识。paths 与 path 互斥时 paths 优先。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
pathsNo
maxBytesNo
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。

TDQS

A4.1/5.0
Behavior4/5

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

Without annotations, the description discloses key behaviors: three retrieval modes, wildcard/negative index support, default maxBytes with truncation, and the truncated flag. It doesn't cover error handling or permissions, but these are reasonable omissions for a getter tool.

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 well-structured with enumerated modes. Every sentence adds value, no redundancy. Information is dense yet easy to parse.

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 getter with no required parameters and no output schema, the description adequately covers how to invoke it and what to expect (data object with possiblly truncated flag). It could be improved by specifying the return shape or error scenarios, but it's sufficient for an AI agent.

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?

Schema coverage is low (25% only for connection), but the description adds rich semantics for path, paths, and maxBytes, explaining wildcard syntax, negative indexing, default value, and truncation behavior. The connection parameter relies on its schema description.

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 clearly states the tool retrieves the current page's data object and details three usage modes. While it doesn't explicitly differentiate from sibling tools like page_expectData, the purpose is well-defined 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 Guidelines4/5

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

The description provides clear guidance on when to use each mode (no param for full tree, path for single sub-path, paths for multi-path projection with wildcards). It recommends paths for large objects and explains the truncation behavior, but lacks explicit alternatives or when-not-to-use scenarios.

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

page_getElementA

通过选择器获取单个页面元素,相当于 page.$(selector)。返回该元素摘要 {tagName,text,value,size,offset}(取不到的字段为 null,不代表元素不存在);withWxml=true 额外返回完整 outerWxml。支持 selector[index=N] 选第 N 个(0 基,仅作用于 selector,innerSelector 内不支持下标)。⚠️ 单次查询,元素不存在直接抛错——若元素来自 setData 后异步渲染 / SSE 流式 / navigateTo 未稳定,先用 page_waitElement 等到再调本工具;等任意非元素条件(page.data 字段变化等)用 mp_pollUntil。⚠️ page.$ 默认不穿透自定义组件(取决于组件 styleIsolation/addGlobalClass);组件内部元素用 selector(组件)+innerSelector,或 element_getInnerElement(s);本工具的 innerSelector 同样是「在已匹配元素内部再查一层」。结果超过 maxBytes(默认 50000B)返回 {selector,index,truncated,bytes,maxBytes,note,data} 包装——多由 withWxml 引起,可关掉它或调大 maxBytes。

ParametersJSON Schema
NameRequiredDescriptionDefault
maxBytesNo
selectorYes
withWxmlNo
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。
innerSelectorNo

TDQS

A4.9/5.0
Behavior5/5

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

The description discloses behavioral traits: imputed null fields do not indicate absence, element not found throws error, selector supports index[N] but innerSelector does not, default maxBytes and truncation behavior. No annotations are present, so the description carries the full burden and meets it well.

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

Conciseness4/5

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

The description is long but well-structured with warnings and examples. It front-loads the core purpose and uses clear formatting. Minor reduction in length could be possible, but every sentence adds value.

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?

Given the complexity (5 parameters, nested objects, no output schema), the description covers return format, error handling, async considerations, component isolation, and truncation. It provides sufficient context for correct invocation.

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 description coverage is only 20%, but the description adds significant meaning for all parameters: selector syntax (index[N]), innerSelector purpose, withWxml effect, maxBytes behavior, and connection object details (including port warnings). This compensates fully for the low schema coverage.

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 gets a single page element by selector, equivalent to page.$(selector). It details the return summary fields and distinguishes from sibling tools like page_getElements (plural) and element_getInnerElement (for inner elements from an element handle).

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?

The description provides explicit guidance on when to use the tool vs alternatives: it warns that elements from async rendering require page_waitElement first, and for non-element conditions use mp_pollUntil. It also explains innerSelector usage for custom components and mentions maxBytes truncation behavior.

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

page_getElementsA

通过选择器获取页面元素数组,相当于 page.$$(selector)。返回 {selector,count,totalCount,limited,elements:[{index,tagName,text,value,size,offset}]};limit 默认/最大 100,避免大页面一次汇总所有元素卡住连接;totalCount 是总命中数,count 是实际返回数。无匹配时返回 count:0 的空列表(不抛错,这是与会抛错的 page_getElement 的关键区别——批量/计数用本工具,单个必存在的元素用 page_getElement)。withWxml=true 给每个元素附完整 outerWxml。支持 selector[index=N](0 基)只取第 N 个。⚠️ page.$$ 默认不穿透自定义组件(是否穿透取决于组件 styleIsolation/addGlobalClass,可用 page_getElements 看实际命中数判断);组件内部元素用 element_getInnerElements,或 element_* 工具的 selector(组件)+innerSelector(内部)。结果超过 maxBytes(默认 50000B)返回截断包装。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
maxBytesNo
selectorYes
withWxmlNo
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。

TDQS

A4.9/5.0
Behavior5/5

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

Without annotations, the description fully covers behavior: returns empty list on no match (no error), default limit and maximum, totalCount vs count, withWxml behavior, selector[index=N] syntax, maxBytes truncation, and penetration limitations of page.$$.

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

Conciseness4/5

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

The description is dense but well-structured, front-loading the main purpose and return structure. It covers many details without redundancy, though it could be slightly shorter.

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?

Given no output schema, the description fully details the return format including all fields. It covers edge cases (no match, truncation) and links to sibling tools for component penetration. Complete and actionable.

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?

Despite low schema coverage (20%), the description explains all parameters: limit (default 100, max 100, reason), maxBytes (default 50000B, truncation), withWxml, connection (optional override), and selector (with special syntax). Adds context and examples beyond 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?

Clearly states it retrieves an array of page elements by selector, equivalent to page.$$(selector). Distinguishes from sibling page_getElement by noting that this tool returns an empty list on no match while the other throws an error.

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 advises when to use this tool (batch/count) vs page_getElement (single required element). Also explains that page.$$ does not penetrate custom components and directs users to element_getInnerElements for that case.

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

page_setDataA

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

ParametersJSON 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。

TDQS

A5/5.0
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.

page_snapshotA

返回当前页面的轻量结构快照,聚合 route、query、指定 data 路径、关键选择器的元素摘要。最适合「不确定页面上有什么」时探查 DOM/状态(page_waitElement 超时排查也会指向它)。返回 {route,query,selectors,elementCount,elementsLimited,processedSelectorCount,elementSummaryLimit,elements:[{selector,index,tagName,text,value,size,offset}],data?,hint?}。⚠️ 不传 selectors/dataPaths/withData 时只返回 route——这不代表页面为空,会附 hint 提示补参。withData=true 会把整棵 data 树塞进 data['$'](token 炸弹,大对象改用 dataPaths 按字段投影)。limit 默认 10,限制每个 selector 返回的元素数;所有 selector 合计最多汇总 100 个元素摘要,达到上限时 elementsLimited=true。整个快照超过 maxBytes(默认 50000B)返回 truncated 包装。单个已知字段用 page_getData,单个元素用 page_getElement。对自定义组件同样默认不穿透(取决于 styleIsolation/addGlobalClass)。

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
maxBytesNo
withDataNo
withWxmlNo
dataPathsNo
selectorsNo
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。
withElementsNo

TDQS

A4.9/5.0
Behavior5/5

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

Without annotations, description fully discloses behaviors: empty args return only route with hint, withData token bomb, default limits, maxBytes truncation, custom component handling, and return structure. No contradictions.

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

Conciseness4/5

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

Description is long but efficient, front-loading purpose. Could be slightly more structured (e.g., bullet points) but every sentence adds value. Very concise given the complexity.

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?

Given 8 parameters, nested objects, no output schema, and no annotations, the description covers essential behaviors, edge cases (empty args, limits, truncation), and alternatives. Highly complete.

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?

Despite low schema description coverage (13%), description adds meaning to all key parameters: explains limit, withData, dataPaths, selectors, maxBytes, and their effects. Compensates fully.

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 returns a lightweight structural snapshot of the current page, aggregating route, query, data paths, and element summaries. Distinguishes from siblings by mentioning alternatives like page_getData and page_getElement for specific use cases.

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 states when to use: '最适合「不确定页面上有什么」时探查 DOM/状态(page_waitElement 超时排查也会指向它).' Also provides alternatives: '单个已知字段用 page_getData,单个元素用 page_getElement.'

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

page_waitElementA

轮询等待选择器对应的元素出现(最长 timeout 毫秒,每 retryInterval 毫秒重试一次)。何时用:元素来自 setData 后异步渲染 / SSE 流式 / navigateTo 未稳定——先 wait 到再用 page_getElement 取内容(本工具只确认出现,返回 {selector,index?,found:true,waitTime},不返回元素摘要)。元素若必然已存在则直接用 page_getElement(一次性、不存在即抛错)。等任意非元素条件(page.data 字段变化 / SSE done / aiStatus='completed')用 mp_pollUntil(通用 predicate 轮询)。支持 selector[index=N](0 基)。timeout 默认 5000ms,SSE/异步场景建议调大到 10000+;retryInterval 默认 200ms。超时抛错并带具体排查建议(模板插值 class / shadow 不穿透 / 连接级故障 / timeout 太短)。

ParametersJSON Schema
NameRequiredDescriptionDefault
timeoutNo
selectorYes
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。
retryIntervalNo

TDQS

A4.9/5.0
Behavior5/5

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

Discloses polling behavior (timeout, retryInterval), return format (selector, index?, found:true, waitTime), that it does not return element summary, and timeout error includes troubleshooting suggestions. No annotations, so description carries full burden and does so thoroughly.

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?

Efficiently structured: purpose first, then usage scenarios, comparisons, parameter details, error handling. Every sentence adds useful information without redundancy.

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?

With 4 parameters, no output schema, and no annotations, the description is self-sufficient. It covers behavior, return value, parameter details, error handling, and use cases. Agent can confidently invoke this 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?

Only connection parameter has schema description (25% coverage). The description compensates by explaining selector's index notation, default timeout and retryInterval, and providing suggestions. Adds significant value beyond 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?

Description clearly states it polls for element appearance, only confirms existence, and distinguishes from page_getElement (content retrieval) and mp_pollUntil (non-element conditions). Verb+resource specific.

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 describes when to use (async rendering, SSE, navigateTo) and when not to (element already exists → use page_getElement; non-element conditions → mp_pollUntil). Provides timeout recommendations (default 5000, suggest 10000+ for async).

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

page_waitElementGoneA

轮询等待选择器对应的元素从页面消失(最长 timeout 毫秒,每 retryInterval 毫秒重试)。何时用:验证 toast / loading / 弹窗 / 骨架屏已消失。成功返回 {selector,gone:true,waitTime}。带 selector[index=N] 时,该索引越界也算「已消失」。timeout 默认 5000ms,retryInterval 默认 200ms。等任意非元素条件(page.data 变化等)改用 mp_pollUntil。超时抛错;若轮询期间持续底层报错会提示可能是连接级故障,建议 mp_healthCheck / mp_recoverConnection。

ParametersJSON Schema
NameRequiredDescriptionDefault
timeoutNo
selectorYes
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。
retryIntervalNo

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It covers polling mechanism, default timeout (5000ms) and retryInterval (200ms), return format {selector,gone:true,waitTime}, index behavior, timeout error, and suggestions for connection issues. Missing details on what if element never existed, but overall transparent.

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

Conciseness4/5

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

The description is concise and front-loaded with the main purpose. It contains essential information without fluff, though it could be structured slightly better (e.g., separate lines for defaults and error handling).

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?

Given the complexity (4 params, no output schema), the description covers the key points: when to use, how it works, defaults, index behavior, error handling, and alternatives. It lacks a full return schema specification but provides the essential return fields. It also mentions the connection parameter indirectly.

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?

Schema description coverage is low (25%), so the description compensates by explaining default values for timeout and retryInterval, the meaning of the selector (with optional index=N), and the behavior of index out-of-bounds. The connection parameter is described in schema but not in description; however the description adds value for other parameters.

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 polls and waits for an element to disappear, with specific usage examples like toast/loading/popup/skeleton screen. It distinguishes itself from siblings like 'page_waitElement' (which waits for appearance) and 'mp_pollUntil' (for non-element conditions).

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?

The description explicitly says when to use (verify disappearance of specific UI elements) and when not to (for non-element conditions, use 'mp_pollUntil'). It also explains special behavior with selector[index=N] where out-of-bounds counts as gone.

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

page_waitRouteA

轮询等待当前页面路径变为指定值,用于验证跳转真正完成(尤其是由 tap / callMethod 间接触发的跳转)。path 传页面路由,与 page.path 同形:无前导 /、不含 query(如 pages/detail/detail)。成功返回 {path,matched:true,waitTime,query};超时抛错并附当前实际 path 便于排查。注意:mp_navigate 返回的 activePage 已是可信的最新路由,导航后通常无需再 waitRoute;本工具主要用于间接跳转。timeout 默认 5000ms,retryInterval 默认 200ms。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
timeoutNo
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。
retryIntervalNo

TDQS

A4.9/5.0
Behavior5/5

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

No annotations provided, but description fully discloses behavioral traits: polling mechanism, success output format, error behavior with current path, default values for timeout and retryInterval. No contradictions.

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?

Description is well-structured: first sentence states purpose, then details path format, return behavior, usage note, and defaults. No wasted words, front-loaded.

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?

No output schema, but description explains return values and error behavior. Covers complex scenario of indirect navigation. With 4 parameters (one nested), description provides sufficient context for correct usage.

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?

Schema description coverage is 25% (only connection has description). Description adds critical meaning: path format (no leading '/', no query), default values for timeout (5000ms) and retryInterval (200ms). However, it does not describe the connection parameter beyond what schema already provides.

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 the tool polls until page route matches specified value, used to verify navigation completion, especially for indirect jumps. It distinguishes from siblings like mp_navigate and page_expectRoute implicitly.

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 states when to use (indirect navigation via tap/callMethod) and when not to (after mp_navigate, since activePage is already latest). Mentions alternative mp_navigate.

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

page_waitTimeoutA

等待指定的毫秒数(dumb sleep)。⚠️ 仅用于「渲染 tick 留白」等无明确信号的极短等待;等任意条件(page.data 变化 / SSE done / 异步状态切换)请改用 mp_pollUntil,否则容易出现时间太短抓空 / 时间太长拖慢测试。

ParametersJSON Schema
NameRequiredDescriptionDefault
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。
millisecondsNo

TDQS

A4.2/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It describes the tool as a 'dumb sleep' and warns about misuse. Discloses that it's not for conditional waits. Does not contradict any annotations.

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?

Two sentences with clear warning and alternative reference. No wasted words; front-loaded with key purpose.

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?

No output schema and no annotations. Description covers basic purpose and usage guidelines but doesn't explain return value or behavior besides being a sleep. For a simple tool, this is adequate but could include more about side effects or default behavior.

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 coverage is 50% (2 params, one with nested connection object). Description only mentions 'milliseconds' implicitly ('等待指定的毫秒数'), but doesn't add details about the connection parameter or provide syntax/format beyond schema. Does not compensate for low schema coverage.

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 uses a specific verb ('等待') and resource ('毫秒数'), and clearly states it's a 'dumb sleep'. It distinguishes itself from the sibling tool 'mp_pollUntil' by specifying use cases: short waits with no clear signal vs. waiting for conditions.

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 states when to use (仅用于「渲染 tick 留白」等无明确信号的极短等待) and when not to use (等任意条件...请改用 mp_pollUntil). Also warns about risks of too short/timing issues.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 44 tool updatesv0.4.8
    • First observedelement_callMethod
    • First observedelement_getAttributes
    • First observedelement_getBoundingClientRect
    • First observedelement_getData
    • First observedelement_getInnerElement
    • First observedelement_getInnerElements
    • First observedelement_getStyles
    • First observedelement_getWxml
    • First observedelement_input
    • First observedelement_scrollTo
    • First observedelement_setData
    • First observedelement_swipe
    • First observedelement_tap
    • First observedelement_touch
    • First observedmp_callWx
    • First observedmp_currentPage
    • First observedmp_diagnoseConnection
    • First observedmp_ensureConnection
    • First observedmp_evaluate
    • First observedmp_generateScenarioReport
    • First observedmp_getLogs
    • First observedmp_healthCheck
    • First observedmp_listProjects
    • First observedmp_navigate
    • First observedmp_pollUntil
    • First observedmp_recoverConnection
    • First observedmp_runScenario
    • First observedmp_screenshot
    • First observedmp_setDefaultProject
    • First observedpage_callMethod
    • First observedpage_expectCount
    • First observedpage_expectData
    • First observedpage_expectElementText
    • First observedpage_expectRoute
    • First observedpage_expectVisible
    • First observedpage_getData
    • First observedpage_getElement
    • First observedpage_getElements
    • First observedpage_setData
    • First observedpage_snapshot
    • First observedpage_waitElement
    • First observedpage_waitElementGone
    • First observedpage_waitRoute
    • First observedpage_waitTimeout

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly defined, distinct purpose. The descriptions include explicit 'when to use' and 'when not to use' guidance, effectively eliminating ambiguity even among similar tools like element_tap, element_touch, and element_swipe. Overlaps are intentional and well-documented, not confusing.

Naming Consistency5/5

All tools follow a consistent prefix_verb_noun pattern (e.g., element_tap, page_getData, mp_navigate). The prefixes ('element_', 'page_', 'mp_') clearly indicate scope, and verbs are descriptive. No mixing of naming conventions or unexpected styles.

Tool Count3/5

With 44 tools, the set is larger than typical (recommended 3-15). However, the domain of WeChat Mini Program automation is broad, covering element interactions, page state, connection management, logging, and scenario testing. The tools are well-organized, but the count feels heavy and may overwhelm agents.

Completeness4/5

The tool surface is very comprehensive, covering CRUD-like operations on elements and pages, navigation, connection management, logging, and scenario orchestration. Minor gaps exist (e.g., no dedicated storage tool, but wx API can be used via mp_callWx). Overall, the set enables end-to-end automation without dead ends.

Maintenance

ActivityStale
ResponsivenessResponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that enables AI assistants to interact with WeChat Mini Programs, allowing developers to publish versions, analyze package size, diagnose compilation errors, and manage projects via natural language.
    78
    3
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server for automating WeChat on Windows, enabling sending messages to friends or groups and exporting UI controls via natural language.
    -

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