Skip to main content
Glama

Right-click

right_click
Destructive

Open a context menu on a UI element or screen coordinates to access secondary-click options, then read the menu with get_app_state and select an item.

Instructions

Right-click (secondary click) an element or screen position to open its context menu. Follow with get_app_state to read the menu items, then click one. Use click for normal activation. Pass element_id or x and y, not both. The user's pointer is treated as for click.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoScreen x coordinate in points, used together with y when no element_id is given
yNoScreen y coordinate in points, used together with x when no element_id is given
element_idNoElement id from the most recent get_app_state snapshot, e.g. e12
state_queryNoWith return_state, list only elements whose role, label or value contains this text, like get_app_state's query
return_stateNoAfter acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.2
    • addedInput schema / properties / return_state
      Added value: +{
      +  "description": "After acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / state_query
      Added value: +{
      +  "description": "With return_state, list only elements whose role, label or value contains this text, like get_app_state's query",
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv0.3.1
    • addedInput schema / properties / element_id / description
      Added value: +"Element id from the most recent get_app_state snapshot, e.g. e12"
    • addedInput schema / properties / x / description
      Added value: +"Screen x coordinate in points, used together with y when no element_id is given"
    • addedInput schema / properties / y / description
      Added value: +"Screen y coordinate in points, used together with x when no element_id is given"
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false and openWorldHint=false, so the safety profile is covered structurally. The description adds the pointer-treatment behavior and the follow-up workflow, but never explains why a context-menu action is flagged destructive, which is the one non-obvious trait worth clarifying.

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?

Front-loads the core purpose, then the follow-up workflow, the alternative tool, and the parameter constraint. Four tight sentences with no filler.

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?

With annotations covering safety, a 100%-covered schema, and no output schema, the description supplies the essential workflow context an agent needs. It stops just short of explaining the destructive flag, but is otherwise complete.

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 100%, so the baseline is 3, but the description adds a genuinely useful constraint not stated in the schema: 'Pass element_id or x and y, not both.' It also implies the two targeting modes, giving the agent more than the raw property descriptions.

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?

States a specific verb and resource ('Right-click (secondary click) an element or screen position to open its context menu') and names the distinguishing effect (opening a context menu) that separates it from the sibling click tool. An agent can identify this without opening the schema.

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?

Gives an explicit workflow ('Follow with get_app_state to read the menu items, then click one') and names the alternative with its selection condition ('Use click for normal activation'), leaving nothing to inference.

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