Skip to main content
Glama

project_close

Close a project window, returning to the home screen; unsaved edits block closure unless saved first or discard_changes=true is set.

Instructions

关闭一个工程窗口(等同工具栏「回到首页」)。有未保存改动时默认拒绝,先 save_project;确实要丢弃改动才传 discard_changes=true。

Input Schema

NameRequiredDescriptionDefault
instance_idNo官方 list_instances 返回的 instance_id,与 project_path 二选一。
project_pathNo目标工程的绝对路径。与 instance_id 二选一;只开了一个工程窗口时都可省略。
discard_changesNo丢弃未保存改动直接关闭。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does disclose the key trait: a default refusal on unsaved changes, plus the mutation escape hatch and the safe alternative (save_project). It does not state what the tool returns, whether other open windows are affected, or what the state is after a forced discard. Strong for a mutation tool, but not fully complete.

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 sentences, zero filler, with the default-safe behavior and the escape hatch front-loaded. Nothing repeats the schema and nothing is left dangling.

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 3-parameter, zero-required mutation tool with no annotations or output schema, the description covers the decisions that matter: prerequisite save, default refusal, forced-discard semantics. The missing piece is target-resolution behavior when both instance_id and project_path are omitted (single-window case), which affects whether an agent can call it blind.

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 3 is the baseline. The description earns above baseline by explaining the behavioral consequence of the discard_changes flag (default rejection vs. forced close) rather than just naming it. It does not clarify the instance_id / project_path mutual exclusivity or the 'both omittable when a single window is open' rule, which the schema itself carries.

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 a project window) and anchors it to a concrete UI equivalent ('等同工具栏「回到首页」'), which removes ambiguity about what closing means here. Against the sibling set (project_open, project_new, works_cleanup), the scope is unmistakable.

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?

Names the prerequisite alternative explicitly ('有未保存改动时默认拒绝,先 save_project') and gives the exact condition for the destructive path ('确实要丢弃改动才传 discard_changes=true'). The 'only if you really mean it' framing of the discard path is real guidance, not a restatement.

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