Skip to main content
Glama
U-C4N
by U-C4N

Close Document

document_close
Destructive

Close an AutoCAD document, optionally saving or discarding unsaved changes. Reports saved status and the new active document.

Instructions

Close a document and report saved, discarded_changes and the new active.

Refusals, all before anything is closed: unsaved changes with neither save nor discard; save on a document that has never been saved (no path to write — live, Close(True) would open AutoCAD's Save dialog and block the COM thread); save together with discard. Closing the last document leaves the backend with none open, which every tool already reports. drawing_close is the same operation for the active document with its 1.4 contract kept. Pack: settings · lean: no.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveNoWrite unsaved changes to the document's own path first
discardNoClose even with unsaved changes, dropping them
name_or_pathNoA name from document_list or the full path; omit for the active document

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true annotation: it explains why save on a never-saved document is refused (live Close(True) would open AutoCAD's Save dialog and block the COM thread), clarifies that refusals happen before anything is closed, and notes the downstream effect of closing the last document.

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 purpose and result contract are front-loaded in the first sentence, and the refusal list earns its space. The trailing "Pack: settings · lean: no." and the 1.4-contract reference are cryptic without external context and dilute density slightly.

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 close operation with an output schema already covering return values, the description covers the remaining risk surface completely: refusal conditions, path preconditions, and the no-documents-left edge case.

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 adds genuine meaning on top: it documents the interaction between save and discard (mutually exclusive, and required when changes are unsaved) and the path precondition for save, which the schema does not express.

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?

Opens with a specific verb+resource ("Close a document") and states the exact reporting contract (saved, discarded_changes, active). It also explicitly differentiates itself from the sibling drawing_close, so an agent can distinguish the two without opening a schema.

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 alternative (drawing_close is the same operation for the active document) and enumerates the when-not conditions under which the call is refused (unsaved changes with neither save nor discard; save on a never-saved document; save plus discard). Selection conditions are left to nothing.

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

Deploy Server

Other Tools