Skip to main content
Glama
hram

FreeCAD MCP

by hram

reload_document

Close and reopen an open FreeCAD document to load external .FCStd changes made outside the GUI, updating stale in-memory geometry from disk.

Instructions

Close and re-open a document to pick up external file changes.

Use this AFTER the document's .FCStd file has been modified by
something outside of FreeCAD's GUI process — for example, a
headless `freecadcmd` script that edited and saved the file. The
open GUI document is otherwise unaware of on-disk changes; this
tool closes the stale in-memory copy and reopens the file from
disk so the GUI shows current geometry.

Args:
    doc_name: The name of the open document to reload. Must match
        the name shown by ``list_documents``.

Returns:
    A message confirming the document was reloaded, or describing
    the failure (document not loaded, no associated file, etc).
    FreeCAD names the reopened document after the file stem, which
    can differ from ``doc_name`` ("HandleConcept3D" saved as
    handle-concept-3d.FCStd reopens as handle_concept_3d); the reply
    names the document you should use from then on.

Examples:
    ```json
    {
        "doc_name": "chassis"
    }
    ```

Input Schema

NameRequiredDescriptionDefault
doc_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses that the in-memory copy is closed and replaced ('closes the stale in-memory copy'), and warns about a non-obvious identity side effect — the reopened document is renamed after the file stem and the reply names the new identifier. It does not explicitly say whether unsaved in-memory edits are discarded or whether the operation can be undone, which is the one material behavioral gap for a destructive-ish reload.

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?

Front-loaded with purpose then precondition, followed by Args/Returns/Examples — a clean structure. The Returns paragraph and the naming parenthetical are somewhat long, though both convey genuinely non-obvious information rather than filler.

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?

No output schema exists, and the description supplies the return semantics itself: a confirmation message or a described failure mode (document not loaded, no associated file), plus the renamed-document caveat. For a single-parameter tool with no annotations, everything an agent needs to call it and interpret the result is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does: doc_name 'Must match the name shown by list_documents', tying the argument to a concrete source of truth. It further explains that the name may change after reload ('HandleConcept3D' → 'handle_concept_3d'), which is semantic information no schema field could convey.

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?

Specific verb+resource ('Close and re-open a document') with the immediate purpose (pick up external file changes) stated up front. It is clearly distinguished from sibling reads like list_documents and get_document_status, which merely report state rather than resynchronize it.

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?

Explicitly conditions use: 'Use this AFTER the document's .FCStd file has been modified by something outside of FreeCAD's GUI process — for example, a headless freecadcmd script.' It also explains the counterfactual (the GUI is unaware of on-disk changes), which implicitly excludes use for in-GUI edits. It routes the agent to list_documents for obtaining doc_name.

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