Skip to main content
Glama

Close Document

close_document
Destructive

Close a FreeCAD document by name (or the active one) to free its objects and invalidate handles, returning which document was closed and which handles were invalidated.

Instructions

Close a document by name (or 'active' for the currently active one). Frees its objects and invalidates any handles into the closed doc. Returns {closed, invalidated_handles}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoactive

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description specifies concrete consequences: objects are freed and handles into the closed document are invalidated. It also discloses the return payload, which is valuable given there is no output schema. No contradiction with annotations.

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?

Three short sentences with no filler: target selection, side effects, and return value are each covered. The most important action is front-loaded.

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 one-optional-parameter tool with destructiveHint and no output schema, the description is complete: it names the target, the side effects, and the return shape. Agents have enough information to invoke it safely and interpret the result.

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 for the single name parameter is 0%, but the description compensates by explaining that it takes a document name and that the literal 'active' refers to the currently active document. This clarifies the default/sentinel behavior, though it does not detail what counts as a valid name.

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: closes a document, selectable by name or 'active'. The target is clearly a document rather than a workspace or sketch, so it is distinguishable from siblings like close_workspace and close_sketch.

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

Usage Guidelines2/5

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

The description explains how to identify the document but does not say when to choose this tool over related operations such as save_document, close_workspace, or set_active_document. No explicit when/when-not or alternative routing is provided.

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