Skip to main content
Glama

right_click

Open the context menu on a selected web element to access right-click options and return a confirmation of the menu action.

Instructions

Open context menu on an element. Returns context menu confirmation. When to use: to access right-click context menu options on an element. Related: click (standard left-click), get_dom_snapshot (find element selectors). Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64). Pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise. RETURNS change_report: when this tool runs, the response includes a change_report field with a compact diff of what the action mutated (URL, dialogs_opened, nodes_added, nodes_removed, attrs_changed, inputs_changed, focus_shift). Use this to learn the consequence without calling read_page next. If the report exceeds the size cap, change_report.truncated:true and change_report_hint are set; call read_page for the full state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientYesAllowlisted client label. Validated against the shared v0.9.36 server/extension allowlist (see mcp/src/tools/visual-session.ts -- MCP_VISUAL_CLIENT_LABELS). Required.
tab_idNoOptional. Tab id this action targets. Omit when the calling agent owns exactly one tab; pass to disambiguate when the agent owns multiple. Single-tab agents and legacy popup/sidepanel/autopilot do not need to pass this.
is_finalNoWhen true, the visual session clears immediately after this tool resolves. Optional (default false).
selectorYesCSS selector or element reference to right-click
visual_reasonYesShort human-readable reason shown in the overlay (for example, "Logging in to GitHub"). Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does so well: it discloses the change_report payload fields (URL, dialogs_opened, nodes_added, attrs_changed, etc.), the truncation path with change_report_hint, and the cross-agent TAB_NOT_OWNED error. It does not say what state the page is left in after the menu opens (whether it must be dismissed) or what happens if the selector is missing.

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 and usage are front-loaded, then mechanics, then return behavior — a sensible order. Slight waste in "Returns context menu confirmation" followed by a much longer change_report paragraph covering the same return topic.

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?

Five parameters, three required, no output schema and no annotations — the description covers the missing pieces by explaining the return payload, its truncation escape hatch, and tab/agent ownership rules. An agent has enough to call it and interpret the result without a follow-up read_page.

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 coverage is 100%, so the baseline is 3. The description reinforces tab_id ownership semantics and the cap, but that repeats what the schema already says; it adds nothing about client allowlisting or visual_reason beyond the schema text.

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 concrete verb and resource ("Open context menu on an element") and lists related siblings (click as standard left-click, get_dom_snapshot for selectors). It does not explicitly contrast the two, but an agent can still distinguish right_click from click without opening a schema.

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?

Gives an explicit "When to use" line and clear tab-scoping guidance: "Pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise." Cross-agent rejection is named (TAB_NOT_OWNED) and the concurrent cap is stated (default 8, 1-64). It lacks a when-not-to-use case, and the usage line largely restates the purpose.

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