Skip to main content
Glama
yo-1
by yo-1

trigger_action

Triggers a QGIS QAction by object name or visible text and returns immediately via deferred execution, so modal dialogs opened by the action do not block UI inspection.

Instructions

Trigger a QAction by objectName (preferred) or its visible text (mnemonic '&' ignored).

The trigger is deferred; the reply is immediate, so a modal dialog it opens does not block. Submenus and disabled actions are refused. Check the result with list_windows / screenshot.

Input Schema

NameRequiredDescriptionDefault
textNo
indexNo
windowNoQgisApp
object_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 burden and does well: it discloses that the trigger is deferred while the reply is immediate, so a modal dialog will not block the caller — a non-obvious and important trait. It also discloses refusal conditions (submenus, disabled actions). It stops short of saying what a refusal or failure looks like in the response.

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?

Three short sentences, front-loaded with the identification strategy, then the async behavior, then the failure modes and verification hint. No filler.

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?

No output schema and no annotations, so the description is the only documentation; it covers behavior and two of four parameters but omits index/window semantics and the shape of success/failure replies. Adequate to attempt a call, not complete.

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 description coverage is 0%, so the description must compensate. It adds real meaning for 'object_name' (preferred identifier) and 'text' (mnemonic '&' ignored), but leaves 'index' and 'window' completely unexplained — the reader cannot tell whether index disambiguates duplicate matches or that window defaults to the QGIS main window.

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 (trigger) and resource (a QAction), plus the two addressing modes (objectName preferred, or visible text with '&' mnemonics ignored). This cleanly separates it from click_widget, which operates on widgets rather than QActions.

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 preference ordering (objectName preferred over visible text) and states hard exclusions: submenus and disabled actions are refused. It also names follow-up tools (list_windows / screenshot) for verifying the outcome, though it never explicitly contrasts itself with click_widget or list_actions.

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