Skip to main content
Glama

ACTION_READ_NOTIFICATIONS

Reads current Android notification entries as JSON, with optional package and limit filters, enabling automation workflows to inspect or act on notifications.

Instructions

读取通知栏当前通知列表(JSON 数组)(需通知使用权)。输出:notifications_success, notification_success, notifications_json, notification_count, notification_error。每项含 package、title、text、post_time。notification_success 是 notifications_success 的旧名,值相同。宿主未注入通知监听源时只能读到本应用自己的通知,并按失败处理。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
limitNo最多条数,范围 1–50(默认 20)
packageNo只要该包名的通知(精确匹配),支持 ${var}
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
output_varNoJSON 另存到的变量名(notifications_json 总会写)(默认 notifications_json)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden, and it discloses real behavior: it needs notification access permission, it reads a snapshot rather than a live stream, it explains the degraded mode when no listener source is injected and says that case counts as failure, and it documents the legacy alias notification_success. What is missing is any mention of latency, rate limits, or freshness of the snapshot, which is why the score is not 5.

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

Conciseness3/5

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

The purpose is front-loaded, which is good. However, the middle section reads like a raw log: the list of output fields includes a duplicated legacy alias explanation, and a stray double period ('。。') appears mid-sentence. The sentence about ${var} interpolation and the variable-snapshot return could be merged with the output sentence.

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?

There is no output schema and there are six parameters, so the description has to describe the return shape itself. It does: it names the output variables (notifications_json, notification_count, notification_error, ...) and the per-item fields (package, title, text, post_time). That is enough for an agent to use the result. The only gap is that it doesn't say how limit and package interact with the count returned.

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 100%, so all six parameters (limit, package, require, on_error, output_var, node_timeout_ms) are already documented in the schema. The description adds only the general note that string parameters support ${var} interpolation, which is cross-cutting and not parameter-specific. A baseline 3 is right here.

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 gives a specific verb and resource: '读取通知栏当前通知列表(JSON 数组)' (read the current notification list from the notification bar). This is clearly distinct from a sibling such as ACTION_SEND_NOTIFICATION, which writes a notification. It does not name the counterpart tool directly, but the read-versus-send distinction is unambiguous.

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?

The description states the prerequisite (notification access permission) and describes one fallback condition (when the host has not injected a listener it can only see its own app's notifications and reports failure). It never says when an agent should choose this tool over a sibling such as ACTION_SEND_NOTIFICATION, or over the generic screen-reading tools. The usage guidance is therefore only implied.

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