Skip to main content
Glama

app_close

Close a specified window gracefully on an agent-controlled virtual screen. Pass the current window ID from the windows tool, and refresh it after remaps because IDs change.

Instructions

Ask a window of the screen to close gracefully. Window ids change when a window remaps, so take the id from windows rather than from an older reply.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "toplevel": "<toplevel>"
    },
    "name": "app_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
screenNoscreen name; optional when the session owns exactly one screen
toplevelYeswindow id from the windows tool

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. "Ask ... to close gracefully" usefully implies a cooperative request rather than a forced kill and hints that the window may not actually close, but it says nothing about permissions, failure behavior, or whether the call is synchronous.

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?

Two short sentences with no filler, and the critical constraint (fresh window id) is front-loaded alongside the purpose. Every sentence carries information an agent needs before calling.

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?

For a two-parameter, no-output-schema tool this is close to complete: purpose, id sourcing, and the single-screen caveat (deferred to the schema) are covered. The main residual gap is guidance on confirming the close took effect, e.g. re-checking via windows, since no output schema exists to report success.

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. The description earns an extra point by adding meaning beyond the schema: the toplevel id is volatile and must be refreshed from the windows tool rather than reused from an older reply.

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 specific verb and resource ("Ask a window of the screen to close gracefully") with the qualifier that the close is graceful, which distinguishes it from a hard destroy. It does not explicitly distinguish itself from screen-level operations or name an alternative, so the differentiation is implicit rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides real guidance on the one place misuse is likely: take the toplevel id from the windows tool because ids change on remap. It gives no explicit when-to-use/when-not conditions and never contrasts with a destructive alternative such as screen_destroy, so the guidance is partial.

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