Skip to main content
Glama

ACTION_GET_SETTING

Reads a specified Android system, global, or secure setting (read-only) and returns its string value plus success/error status, enabling workflows to validate or branch on device configuration.

Instructions

读取一项系统设置(只读)。输出:setting_value, setting_key, setting_namespace, setting_success, setting_error。值总是字符串;键不存在或无权读取时 setting_success=false(新版 Android 限制读取部分 secure/global 键)。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
keyYes设置键名,如 screen_off_timeout、adb_enabled;支持 ${var}
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
namespaceNo设置表(默认 system)
output_varNo结果变量名(默认 setting_value)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 behavioral burden and does well: it declares read-only semantics, lists the five result fields, states that values are always strings, and explains that setting_success=false covers both missing keys and permission denials under newer Android restrictions. It also discloses ${var} interpolation and that results are returned as a variable snapshot JSON. Missing only retry/timeout behavior, which the schema covers instead.

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?

It is front-loaded with the purpose, then outputs, then failure semantics, then interpolation, which is a sensible order. There is a stray doubled period ('。。') and the five-field output enumeration is dense, but since no output schema exists the enumeration earns its place.

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 six-parameter tool with no annotations and no output schema, the description covers the essential ground: what is returned, that values are strings, how failure is signalled, platform restrictions, and interpolation/return format. Only the interaction between require and on_error failure handling is left entirely to the schema, a minor gap.

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 every parameter including key, namespace, require, on_error, output_var and node_timeout_ms is already documented, giving a baseline of 3. The description adds some meaning by noting string parameters support ${var} interpolation and that secure/global keys may be unreadable, but the interpolation note largely repeats the key schema description and it says nothing extra about namespace choice or output_var.

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 opens with a specific verb and resource, '读取一项系统设置(只读)' (read one system setting, read-only), so an agent immediately knows what the tool does and that it has no side effects. It does not differentiate from nearby siblings such as ACTION_GLOBAL_KEY or ACTION_SET_VARIABLE, which is the only thing keeping it from a 5.

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?

Usage is implied by the read-a-setting purpose and the note that newer Android restricts reading certain secure/global keys, which hints at when reads may fail. There is no explicit 'use this when…, use X instead' routing against any of the dozens of sibling ACTION_* tools, so the agent must infer placement itself.

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