Skip to main content
Glama

Press key

browser_press_key
Destructive

Press a keyboard key in the delegated tab. Supported keys: letters, digits, space, Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, Insert, F1–F12, and one other character such as ü. Distinct modifiers may prefix one key in any order (Shift+Control+ArrowLeft, Control+Shift+A, Control+Alt+Delete, Meta+c). Control and Ctrl are the same modifier. A repeated modifier is INVALID_ARGUMENT ("Duplicate modifier: Shift", "Duplicate modifier: Control"). An unknown token is INVALID_ARGUMENT ("Unknown key: Nope"). An empty part ("Shift+", "+A") or a modifier with no key (Shift, Shift+Control) is INVALID_ARGUMENT ("Chord is missing a key"). Those checks run before the tab is touched. Modifier chords do not insert text. elementId requires observationId (INVALID_ARGUMENT otherwise). Without elementId, the key goes to the focused element and the result includes target: { tag, id? }. A password, current-password, new-password, one-time-code, or cc-number field returns HUMAN_INPUT_REQUIRED for printable characters, Backspace, Delete, and Insert, and does not change the field. Tab, Enter, and Escape are still sent. ArrowUp and ArrowDown change input[type=number]. Text a number, date, time, or color input cannot hold returns INVALID_INPUT_VALUE and does not set the value. A non-ASCII character is inserted as text only on a field the agent may edit. Events are not isTrusted. Key presses are paced; RATE_LIMITED means wait retryAfterMs.

Input Schema

NameRequiredDescriptionDefault
keyYes
elementIdNo
sessionIdYes
observationIdNo
idempotencyKeyNoA key replays the original result only within ~60 seconds of the first call, only for the same Mcp-Session-Id, the same credential (API key or OAuth token), the same browser session, and the same tool. After the window, or under a different session/credential/tool, the call executes and bills normally. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED and is not executed or billed. Refusals (e.g. NO_HISTORY_ENTRY) are not cached, so the same key re-executes once state changes. A key passed in _meta is ignored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: validation happens before the tab is touched, exact INVALID_ARGUMENT messages for duplicate modifiers/unknown tokens/missing keys, HUMAN_INPUT_REQUIRED semantics for sensitive fields, INVALID_INPUT_VALUE for untypeable inputs, target reporting on the result, untrusted events, and RATE_LIMITED pacing. This is exactly the mutation-risk context destructiveHint=true implies but cannot explain.

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?

Purpose is front-loaded and every sentence carries actionable information, but the body is a dense run-on sequence of error cases that would read better as short grouped sentences or a compact list.

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 destructive, open-world mutation tool with no output schema and low parameter coverage, the description supplies the error taxonomy, the sensitive-field safety rule, the result shape (target), and rate-limit handling. An agent has everything needed to call it correctly and interpret failures.

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?

Schema coverage is only 20%, so the description carries real weight — 'key' gets a full accepted-key enumeration and chord grammar, and elementId/observationId get their dependency and fallback behavior spelled out. sessionId and idempotencyKey are left to the schema (idempotencyKey does have a schema description), which is acceptable coverage.

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 first sentence gives a concrete verb and resource ('Press a keyboard key in the delegated tab') and the supported-key list plus the note 'Modifier chords do not insert text' implicitly separates it from browser_type. It never names a sibling tool explicitly, so the differentiation is inferred rather than stated.

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?

Extensive conditional guidance: elementId requires observationId, no elementId means the key goes to the focused element, password/one-time-code fields return HUMAN_INPUT_REQUIRED for printable keys but still accept Tab/Enter/Escape, and rate limiting means waiting retryAfterMs. It lacks an explicit 'use browser_type instead when...' routing statement but the context is otherwise unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.