Skip to main content
Glama

ACTION_SCREENSHOT

Capture the current Android screen as a base64 JPEG or PNG file path for automation workflows, requiring Shizuku or root access.

Instructions

截取当前屏幕(shell screencap),输出 base64 JPEG 或文件路径(需 Shizuku 或 root(screencap))。输出:screenshot_success, screenshot_error, screenshot_width, screenshot_height, screenshot_base64。截图文件写在 DCIM/habitat_screenshot_<时间戳>.png,不会自动删除。节点必须带 params(可为 {}),缺 params 字段时什么都不做。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
formatNobase64=JPEG 的 base64 字符串,file=PNG 文件绝对路径(默认 base64)
qualityNobase64 时的 JPEG 质量 1–100(默认 80)
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
output_varNo结果存到的变量名(format=file 时存的是路径)(默认 screenshot_base64)
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, the description carries the full burden and does well: it discloses the privilege requirement, names the side-effect file (DCIM/habitat_screenshot_<时间戳>.png), states that file is never auto-deleted, and warns that omitting params causes a no-op. It does not cover failure modes such as what happens if Shizuku is unavailable beyond the generic on_error parameter.

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 and the sentences are short, but the enumeration of output fields duplicates information an output schema would normally carry, and the nested parenthetical '(需 Shizuku 或 root(screencap))' plus a doubled '。。' make it read as unedited. Tightening would improve it without losing content.

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 6-parameter, no-annotation tool with no output schema, the description covers the essentials: privilege requirement, both output formats, side-effect files, the params requirement, variable interpolation, and the returned field names. What is missing is error behavior detail and guidance relative to sibling screen tools.

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% and the schema already documents format, quality, require, on_error, output_var, and node_timeout_ms, so baseline is 3. The description adds only the default output variable name implicitly via the output field list, not meaningful semantics for the remaining parameters.

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 states a specific verb and resource ('截取当前屏幕(shell screencap)') plus its two output forms (base64 JPEG or file path), so an agent knows exactly what happens. It does not, however, differentiate itself from nearby siblings such as ACTION_READ_SCREEN, screen, or debug_screen, which an agent could easily confuse with a screenshot action.

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?

It gives a real prerequisite ('需 Shizuku 或 root'), which is useful routing guidance, and warns that the node must carry a params field. But it never says when to prefer this over ACTION_READ_SCREEN or the other screen-related siblings, leaving the main selection decision to inference.

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