Skip to main content
Glama

Close an app sub-window

window_close

Closes a CyberBrick app window by its windowId to prevent window buildup. Unsaved changes still trigger the app's own confirmation dialog.

Instructions

Close a CyberBrick app window by its windowId (from window_list). Uses the app's own closeSubWindow (window:close-sub-window IPC) — the same path as the window's close button; unsaved changes trigger the app's own confirm dialog, which the MCP does not bypass. The MCP-connected window cannot be closed (REFUSE_CLOSE_CURRENT). Each project_open_editor with target="new" opens one of these — close them to avoid window buildup. MUTATING.

Input Schema

NameRequiredDescriptionDefault
windowIdYesWindow id to close (from window_list). Must not be the current window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the exact execution path (app's own closeSubWindow via window:close-sub-window IPC, same as the close button), that unsaved changes trigger the app's own confirm dialog which the MCP does not bypass, and the refusal error code for the current window.

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 is front-loaded in the first clause and every subsequent sentence adds real constraints. It is dense with parentheticals and the trailing 'MUTATING.' largely restates readOnlyHint=false, which keeps it just short of fully tight.

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 single-parameter mutation with no output schema, everything needed to call it correctly is present: ID source, the refusal case, the confirmation-dialog behavior, and the cleanup rationale.

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% and the schema already says the id comes from window_list and must not be the current window, so the description mostly repeats structured data rather than adding new format or semantics for windowId.

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 (close an app sub-window) plus the identifier it operates on (windowId from window_list), and the 'sub-window' qualifier distinguishes it from window_close_others and from closing the main window.

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 when-to-use (each project_open_editor with target="new" creates one of these; close them to avoid buildup), an explicit when-not (the MCP-connected window cannot be closed, REFUSE_CLOSE_CURRENT), and points to window_list as the ID source.

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