Skip to main content
Glama

get_ui_context

Capture the current UI state of an Android or iOS app, returning a compressed screenshot and a list of interactive elements with properties. Specify platform, device, and filters to target specific UI components.

Instructions

Capture the current UI state including screenshot and interactive elements. Returns a compressed screenshot and a list of UI elements with their properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesTarget platform
deviceIdNoDevice ID or name (optional, uses first running device if not specified)
includeAllElementsNoInclude all elements, not just interactive ones (default: false)
maxDepthNoMaximum depth to traverse in UI hierarchy (default: 20)
screenshotQualityNoScreenshot JPEG quality 1-100 (default: 50)
skipScreenshotNoSkip screenshot capture for faster response (default: false)
elementTypesNoFilter to specific element types
Behavior2/5

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

With no annotations, the description should disclose behaviors beyond output. It only mentions returns, not side effects, auth needs, or rate limits. Minimal value added.

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

Conciseness5/5

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

Two sentences, front-loaded with main purpose and output. No redundant words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 7 parameters and no output schema, the description only gives a high-level output summary. It omits how parameters affect results (e.g., filtering, screenshot quality, depth).

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 the schema already explains parameters. The description adds no parameter-specific meaning beyond 'current UI state'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Capture' and the resource 'current UI state', and specifies the output (compressed screenshot and UI elements list). This distinguishes it from sibling tools like 'inspect_app_state' or 'interact_with_ui'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., 'inspect_app_state' for app-level state). No exclusions or when-not-to-use info.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abd3lraouf/specter-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server