Skip to main content
Glama

keyboard_state

Reports whether the iOS software keyboard is visible, its height in CSS pixels, and which focused fields, interactive elements, popups, or fixed/sticky bars it covers.

Instructions

Is the keyboard up, how tall is it, and what does it cover? Returns the layout and visual viewport, the focused field and whether it is visible above the keyboard, the interactive elements and popups that reach under the keyboard, and the fixed or sticky elements (with behindKeyboard set when a bar is hidden by it). Heights are CSS px.

Input Schema

NameRequiredDescriptionDefault
pageNoindex in inspector_pages; default the first page with a real address
waitNoseconds to wait for the page list, default 60

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: the interrogative 'Returns...' framing makes clear this is a passive read with no side effects, and it discloses the exact payload (viewport, focused field visibility, overlapping elements, fixed/sticky bars) plus units in CSS px. It does not explicitly state that it is non-mutating or how long a read takes, which keeps it from a 5.

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 core question is front-loaded in the first sentence and the return payload follows. The second sentence is a long enumeration, but since there is no output schema, each listed field earns its place; only minor trimming would improve it.

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-required-parameter read with no output schema and no annotations, the description supplies everything an agent needs: what it reports, the shape of the return, the meaning of behindKeyboard, and the unit (CSS px). Parameter details are fully covered by the 100%-covered schema.

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 both parameters (page, wait) are documented in the schema, so the baseline of 3 applies. The description adds no additional meaning about the page index or the wait timeout, relying entirely on the schema for parameter behavior.

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 frames a specific query resource (keyboard up/tall/coverage) and enumerates exactly what is returned: layout and visual viewport, focused field visibility, interactive elements and popups under the keyboard, and fixed/sticky elements with a behindKeyboard flag. It is clearly a read/state inspection tool, but it never distinguishes itself from the nearby keyboard_check and keyboard_events siblings, leaving an agent to infer the difference.

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?

The question-style phrasing ('Is the keyboard up, how tall is it, and what does it cover?') strongly implies the use case: diagnosing keyboard occlusion and layout. However, there is no explicit when-to-use, when-not-to-use, or routing statement against keyboard_check, keyboard_events, or keyboard_show/hide, so the guidance is only implied.

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