Skip to main content
Glama

ACTION_WIFI

Toggle or query Android Wi-Fi state via system APIs; on/off/toggle require Shizuku or root, while status checks work without elevated permissions.

Instructions

WiFi 开关、切换、查询状态(开关需 Shizuku 或 root(Android 10+ 系统 API 对普通应用无效);status 不需要)。输出:wifi_success, wifi_enabled, wifi_state。wifi_state 是 WifiManager 数字码:0=关闭中 1=已关 2=开启中 3=已开 4=未知;开启中也算 wifi_enabled=true。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
actionYeson/off/toggle 开关;status 查询(只有 status 写 wifi_enabled/wifi_state)
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 and does well: it discloses the privilege requirement, the exact output fields, the numeric wifi_state code table, and the rule that a transitional state still sets wifi_enabled=true. It does not say whether the call blocks until the WiFi state settles or returns immediately after issuing the request, which matters for the 'turning on/off' states it defines.

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?

Front-loaded with the operations, then the permission caveat, then the output contract — the ordering matches how an agent reads it. There is minor redundancy (the wifi_enabled clarification repeats the state table, and a stray doubled '。。' punctuation), but virtually every clause contributes.

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 tool with no output schema and no annotations, the description supplies the missing pieces: permission requirements, return field names, the state code mapping, and the variable-snapshot return format. An agent can call it and interpret the response without further documentation.

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 coverage is 100%, so the schema already documents all four parameters, including which action writes which output variable. The description adds only that string parameters support ${var} interpolation, a small but genuine addition beyond the schema; nothing else about require, on_error, or node_timeout_ms is expanded.

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?

Names a specific resource (WiFi) and enumerates the exact operations (on/off/toggle/status query) with a concrete verb for each. It is not confused with any sibling, although it never explicitly distinguishes itself from ACTION_NETWORK_STATUS or ACTION_GET_SETTING, which an agent may also consider for connectivity questions.

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?

Gives a real prerequisite that changes tool selection: on/off/toggle require Shizuku or root on Android 10+ because the system API is unavailable to ordinary apps, while status does not. It does not tell the agent when to prefer a sibling (e.g. ACTION_NETWORK_STATUS for connectivity) or what to do if neither Shizuku nor root is available.

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