Skip to main content
Glama

get_app_state

Retrieve active window, focused widget, and screen information to determine UI focus before sending keyboard input.

Instructions

Get app-level state: active window, focused widget, screen info. Useful to understand focus before sending keyboard events.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoApp pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It implies a read-only inspection via 'Get' and states what state is returned, which gives basic transparency. However, it does not discuss freshness, error behavior, whether an app must be running, or any side effects, leaving some ambiguity for an agent invoking it.

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?

The description is two sentences with no filler. The first sentence states what the tool returns, and the second provides a focused usage scenario. Every word contributes to tool selection and invocation.

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?

Given the simple single-parameter schema and presence of an output schema, the description is largely complete. It lacks an explicit distinction from get_app_status, but the enumerated return contents reduce confusion. For a lightweight state getter, this is adequate for correct invocation.

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 the pid parameter is already fully documented in the input schema. The description adds no additional parameter guidance, but the schema's explanation of pid, last launched app, and multi-app scenarios is sufficient. Baseline 3 applies because the description does not need to compensate.

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 clearly states the tool retrieves app-level state and enumerates specific contents: active window, focused widget, and screen info. This makes the resource and scope distinct enough from sibling tools. It could be improved by explicitly contrasting with get_app_status, but the verb and enumerated fields provide a clear primary purpose.

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?

The description gives a concrete use case: 'Useful to understand focus before sending keyboard events.' This tells an agent when to use the tool, but it does not mention exclusions or alternatives such as get_widget_tree or get_app_status. Clear context without explicit exclusions fits the '4' level.

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

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/com55/pyside6-mcp'

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