Skip to main content
Glama
FreeCAD Tutor MCP
by alex-r-t

close_document

Safely close the active FreeCAD document, refusing unsaved changes unless you opt to save before closing or discard them.

Instructions

Close a document safely (refuses if modified unless save_before_close or discard_unsaved is True).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "close_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_nameNo
discard_unsavedNo
save_before_closeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations mark this as non-readonly, non-destructive, non-idempotent; the description adds the genuinely useful fact that closing is refused when the document is dirty unless one of the two flags is set. It does not say what state the document is left in after a refusal, whether the reference becomes invalid after success, or whether an exception is raised versus a soft failure. With annotations already covering the safety profile, this adds real but incomplete behavioral context.

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?

One sentence with the guard condition front-loaded in a parenthetical, no filler, and the most decision-relevant information in the first clause. Nothing could be cut without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no prose, and the annotations cover the safety profile. What is missing for a lifecycle tool is the doc_name default behavior and the post-call state of the document, which an agent needs to chain close_document correctly after save_document.

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 description coverage is 0%, so the description has to carry parameter meaning, and it does explain the two behaviorally decisive booleans (save_before_close, discard_unsaved) as the escape hatches for the dirty-document refusal. The third parameter, doc_name, is unmentioned and its empty-string default is unaddressed, so the enumeration of parameters is incomplete.

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 ("Close a document") plus the scope word "safely," which is immediately unpacked. It implicitly contrasts with save_document and open_document by describing the refusal-on-unsaved behavior, though it never names them.

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?

The refusal rule tells the agent what it must pass to succeed, which is a form of invocation guidance, but there is no explicit when-to-use versus save_document/close-alternatives or when-not-to-use. The agent must infer that this is the terminal step in a document lifecycle.

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