Skip to main content
Glama

screen.snapshot

screen_snapshot

Retrieves the visible elements of the focused React Native screen with text, buttons, inputs, test IDs, bounds, and accessibility state for UI inspection and automation.

Instructions

Buttons, inputs, text, and testID or labelled views on screen, with rects and checked/selected/expanded state (a Switch's value is checked). actions lists the accessibility actions an element handles; one with "activate" and no onPress (a swipe-to-confirm) is a button screen.press can press. Only the focused screen: unfocused tabs and stack screens, content under an open modal, display:none and accessibility-hidden subtrees are left out, and hidden counts the elements skipped. {all:true} lists everything, marking off-screen (onScreen:false) and hidden (hidden:true) ones. A WebView registered with the react-native-webview adapter shows as one webview element with its name: use webview.* inside it. Options: {format:"json"|"text"} (the runtime default is JSON with rects; the CLI and the MCP server return the text form unless you pass {format:"json"}). Text is one line per element: kind (or role: switch, checkbox, tab), #testID, text, label, value, state, then readonly, actions=…, offscreen, hidden. Lines that repeat get index=N (the {index} of the target that names them); a line with no testID, text, label or placeholder gets @x,y, the point for {at:[x,y]}. JSON has rects, onScreen:false and hidden:true. {kinds:["button","input"]} keeps only those kinds (kinds are button, input, text, view, webview; a switch or tab is a button); {within: target} keeps only elements under that target in the tree (a target as for screen.press; with several matches pass {testID, index} inside it).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "screen_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoThe tool's arguments, in order (each any JSON value). Leave out for none.
fullNoReturn a result over 32 KB whole instead of a summary of its size and shape.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4/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 burden well: it discloses the scope limit (only the focused screen; unfocused tabs, stack screens, content under modals, display:none and accessibility-hidden subtrees are excluded), reports `hidden`, marks off-screen elements, and explains how WebViews are collapsed into one element. It leaves unstated that the operation is read-only and side-effect free, but otherwise gives strong behavioral context.

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?

Every sentence carries information, but the block is dense, run-on, and front-loaded with output contents rather than purpose. Format defaults and option details are interleaved in ways that make it hard to scan; a small amount of structural separation (scope, options, output) would improve it without cutting 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?

For a complex, high-cardinality tool with no output schema, the description covers scope, filtering options, output shape in both text and JSON forms, line-numbering/index conventions, and cross-tool handoffs. An agent has enough to call it correctly 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema technically has 100% coverage but only for two generic parameters (`args` array and `full`), so the real semantics live in the description. It documents {all}, {format}, {kinds}, {within}, and the {index}/{at:[x,y]} addressing conventions, which is substantial value. It never explicitly states that these option objects are passed as elements of `args`, which is the one gap.

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 makes clear that this returns the elements on the current screen (buttons, inputs, text, testID/labelled views) with rects and state, and it names related tools (screen.press, webview.*) in context. However, it opens with a fragment describing contents rather than a crisp statement of the action, and it does not directly contrast itself with siblings like screen_findText or screen_capture.

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?

Several concrete usage conditions are given: use {all:true} to also see off-screen and hidden elements, use {within: target} to scope to a subtree, use {kinds:[...]} to filter, and use webview.* tools inside a webview element. What is missing is explicit guidance on when to reach for this tool versus alternatives such as screen_findText or screen_capture.

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