Skip to main content
Glama

pilot_press_key

Press keyboard keys like Enter, Tab, or Escape to interact with web pages during browser automation tasks.

Instructions

Press a keyboard key (Enter, Tab, Escape, ArrowDown, Backspace, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey name (e.g. Enter, Tab, Escape, ArrowDown, Shift+Enter)

Implementation Reference

  • The handler function for 'pilot_press_key' which executes the Playwright keyboard press operation.
    async ({ key }) => {
      await bm.ensureBrowser();
      try {
        await bm.getPage().keyboard.press(key);
        bm.resetFailures();
        return { content: [{ type: 'text' as const, text: `Pressed ${key}` }] };
      } catch (err) {
        bm.incrementFailures();
        return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
      }
    }
  • The registration of the 'pilot_press_key' tool on the MCP server, including its schema definition.
    server.tool(
      'pilot_press_key',
      'Press a keyboard key (Enter, Tab, Escape, ArrowDown, Backspace, etc.).',
      { key: z.string().describe('Key name (e.g. Enter, Tab, Escape, ArrowDown, Shift+Enter)') },
      async ({ key }) => {
        await bm.ensureBrowser();
        try {
          await bm.getPage().keyboard.press(key);
          bm.resetFailures();
          return { content: [{ type: 'text' as const, text: `Pressed ${key}` }] };
        } catch (err) {
          bm.incrementFailures();
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
Behavior2/5

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

No annotations provided, yet the description discloses almost no behavioral traits. Missing critical details: whether this targets the currently focused element, what keyboard events are dispatched (keydown/keyup), timing behavior, or whether modifier combinations are supported (though schema shows Shift+Enter).

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?

Single sentence, front-loaded with the action verb. Every word serves a purpose. Appropriate length for a single-parameter tool.

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

Completeness3/5

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

Given this is a simple single-parameter action tool with no output schema, the description covers the basic contract. However, for a browser automation tool, the omission of focus requirements and event behavior leaves gaps that could cause agent invocation errors.

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 has 100% coverage with the 'key' parameter well-described. The description adds example values (Backspace, etc.) that complement the schema examples, but doesn't add semantic depth like explaining modifier syntax or case sensitivity beyond what the schema already provides.

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?

Clear verb 'Press' and resource 'keyboard key' with helpful examples (Enter, Tab, ArrowDown, etc.). However, it doesn't explicitly distinguish from sibling tool 'pilot_type' which likely handles text strings versus single key presses.

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 versus alternatives like 'pilot_type', nor prerequisites such as requiring a focused element. The examples suggest syntax but don't explain selection criteria.

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/TacosyHorchata/Pilot'

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