Skip to main content
Glama

get_state

Retrieve the full desktop state, including monitors, open windows, zone sets, and app rules, before applying a window layout.

Instructions

Get the current desktop state: all screens/monitors (index, frame, visible area — coordinates have origin at top-left of the primary screen, y grows down), all open windows (app name, title, which screen it is on, absolute frame, and 'fraction' — its position as fractions 0..1 of that screen's visible area), 'zone_sets' (every set by name, each zone as {x,y,w,h} with a 'name' where the set gives it one), 'screen_zone_sets' (which set each monitor wears), saved layout names, 'app_rules' (where each app's new windows open, see set_app_rule), 'place_new_windows' and 'auto_fill_zones', whether a keep-awake session is holding, and 'disabled_features': the modules the user switched off in Plonk (zones, workspaces, shot, ruler, awake and so on). A tool belonging to one of those fails with an error saying so until the user switches it back on. ALWAYS call this first before applying a layout, to see which apps are running and how many monitors there are.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations present, the description carries the full behavioral burden. It goes well beyond a vague 'get state' by specifying coordinate origins, y-axis direction, window fraction semantics, and the fact that disabled modules cause sibling tools to fail with an error until re-enabled. This gives meaningful behavioral context for a read-only introspection tool.

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

Conciseness4/5

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

The description is long but dense: every clause contributes something, covering returned fields, coordinate conventions, disabled-feature failure behavior, and the 'call first' guidance. It is front-loaded with the core purpose, though the heavy parenthetical structure keeps it from being maximally clean.

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 zero-parameter tool with no output schema and no annotations, the description itself acts as the output contract. It enumerates screens, windows, zone_sets, screen_zone_sets, layout names, app_rules, toggles, keep-awake state, and disabled_features, and it explains the primary invocation context. An agent has enough information to use it correctly.

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 tool has zero parameters, so the schema leaves nothing to clarify and the description has no parameter semantics to explain. Per the baseline for parameterless tools, a 4 is appropriate because there is no risk of parameter misunderstanding.

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 opens with 'Get the current desktop state' — a specific verb and resource — and then enumerates the exact returned domains: monitors, windows, zone_sets, app_rules, layout names, and disabled_features. This makes it unmistakable and clearly distinct from sibling action tools like snap_window and apply_layout.

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?

It gives an explicit usage directive: 'ALWAYS call this first before applying a layout, to see which apps are running and how many monitors there are.' It does not name alternatives or when-not conditions, but as the only state-reading sibling tool in the list, the context is sufficient for an agent to know when to invoke it.

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