Skip to main content
Glama

cancel_native_file_dialog

Destructive

Cancel an open Windows file dialog using its inspection ticket, ending the native file selection after physical approval and confirming the dialog closes.

Instructions

Explicit desktop capability: cancel the Windows file dialog identified by a fresh inspect_native_file_dialog ticket. Requires desktop_opt_in=true and follows the current safe/lab physical-approval policy. Each opted-in attempt consumes its ticket. After the physical-input lease, enforced quiet gate, identity, foreground and Cancel hit checks, sends one bounded message to that Cancel control without activating a window. Reports cancelled only after observing the dialog HWND gone; uncertain delivery or closure is unknown with retry_safe=false. Inspect state before another action. Returns desktop, on_screen and input_quiet diagnostics; unsupported native layouts are refused. Approval failures expose reason in the result and diagnostics: elicitation_unsupported, declined, timeout, cancelled or error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketYes
desktop_opt_inNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.4

TDQS

A4.6/5.0
Behavior5/5

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

Despite annotations already marking the tool as destructive and non-idempotent, the description adds substantial behavioral detail: each attempt consumes its ticket, the action sends one bounded message without activating a window, cancellation is only reported after the HWND disappears, uncertain results are unknown with retry_safe=false, and failure reasons are enumerated.

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?

The description is dense but front-loaded with the core capability and requirements. Most sentences add important operational detail, though a few clauses like "Explicit desktop capability" and the retry_safe phrasing add minor redundancy or ambiguity without much value.

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?

For a destructive, non-idempotent desktop interaction tool, the description covers prerequisites, side effects, success criteria, failure modes, and post-action guidance. With an output schema present, it sufficiently covers what an agent needs to invoke the tool correctly.

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?

Even though schema description coverage is 0%, the description explains that ticket must come from a fresh inspect_native_file_dialog call and that desktop_opt_in=true is required and consumed per attempt. It does not fully elaborate the format of ticket or behavior when desktop_opt_in is false, but it gives meaningful guidance for both parameters.

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?

The description opens with a specific verb and resource: "cancel the Windows file dialog identified by a fresh inspect_native_file_dialog ticket." It clearly distinguishes this from siblings like inspect_native_file_dialog and handle_dialog by focusing on the cancel action and requiring a prior inspection ticket.

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?

The description gives clear context: it requires desktop_opt_in=true, follows a safe/lab physical-approval policy, and requires a fresh ticket from inspect_native_file_dialog. It stops short of naming alternative tools for other dialog actions, so it lacks explicit when-not-to-use guidance, but the usage context is strong.

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