Skip to main content
Glama

apps_host_input

Destructive

Operate an active app's menu or device surface via normalized host-window pointer and key input when hostMenus and AI control are enabled; read input targets first and verify after delivery.

Instructions

Open and operate Menu or Device for the active device App, only when ai_capabilities.hostMenus enables that surface and AI owns control. Read apps_input_targets first. event open opens the named menu; click/drag/scroll coordinates are normalized to the ENTIRE host window (including Monitor bars), not the App viewport. Supports touch-style pointer interaction and navigation keys. Does not operate permission/AI approval, access-management or lifecycle controls. Never sends caller-supplied script or selectors. Verify screenshots/state after delivery.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "instanceId": "<instanceId>",
      "generation": "<generation>",
      "surface": "<surface>",
      "event": "<event>"
    },
    "name": "apps_host_input"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventYestype: open/click/drag/scroll/key. open needs no coordinates. Pointer x,y and drag toX,toY: 0..1 of the whole host window. Scroll deltaX,deltaY: -2000..2000 CSS pixels. Keys: Tab/Enter/Escape/space/arrows/Home/End; optional shiftKey. No text or browser modifier shortcuts.
surfaceYes
generationYes
instanceIdYes
connectionRefNoThe host connection to act on, as returned by terminal_connect (for example vrch-110.vrch.ai). Required when several hosts are connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / connectionRef
      Added value: +{
      +  "description": "The host connection to act on, as returned by terminal_connect (for example vrch-110.vrch.ai). Required when several hosts are connected.",
      +  "type": "string"
      +}
  2. Addedv0.1.4

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructive, openWorld and non-idempotent, but the description adds hard-to-infer behavior: coordinates are normalized to the entire host window including Monitor bars rather than the App viewport, no caller-supplied script or selectors are ever sent, and the caller must verify screenshots/state after delivery. That is exactly the operational context an agent needs before issuing a destructive pointer interaction.

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?

Front-loaded with purpose and gating, then prerequisite, event behavior, coordinate semantics, exclusions, and verification - each sentence carries distinct information with little redundancy. The density is high and sentences are long, which costs a point on readability.

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?

For a destructive, non-idempotent pointer tool with no output schema and a nested event parameter, the description covers gating, prerequisites, coordinate space, allowed inputs, exclusions, and post-call verification. It omits what happens on stale generation or partial delivery, but nothing essential to invoking it correctly is missing.

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 40%, so the description must carry meaning, and it does resolve the highest-risk ambiguity: x/y and toX/toY are 0..1 of the whole host window, not the App viewport. The nested event type list is echoed from the schema, and instanceId/generation/connectionRef semantics are left entirely to the schema, which keeps it below a 5.

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?

States a specific verb and resource: open and operate Menu or Device on the active device App, with the gating condition (ai_capabilities.hostMenus, AI ownership). The 'Menu or Device' surface wording plus the exclusion list makes it distinguishable from apps_interface_input and apps_preview_input, though it never names those siblings directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit gating is given up front ('only when ai_capabilities.hostMenus enables that surface and AI owns control') along with an ordering prerequisite ('Read apps_input_targets first'). It also states what the tool must not be used for (permission/AI approval, access-management, lifecycle controls), which effectively routes those cases away from this tool.

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