Skip to main content
Glama
freecad-mcp

freecad-mcp

reload_document

Closes a stale in-memory document and reopens it from disk so the GUI reflects changes made externally, such as by a headless script.

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" }

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doc_name": "<doc_name>"
    },
    "name": "reload_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.32

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description does real work: it states the stale in-memory copy is closed, explains that the reopened document is renamed after the file stem (with a concrete HandleConcept3D/handle-concept-3d example), and lists failure modes (document not loaded, no associated file). It stops short of explicitly warning that unsaved in-memory edits are lost, which is the main risk of a close-and-reopen.

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 critical condition and the rename caveat are front-loaded and the docstring-style Args/Returns/Examples layout is easy to scan. The example block is a single trivial argument, so it adds little, and the Returns section is somewhat long for what it conveys.

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 one-parameter mutation tool with no annotations and no output schema, the definition covers trigger, side effects, return message, and the renamed-document pitfall. The only material omission is an explicit statement about what happens to unsaved in-memory changes.

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 0%, so the description must carry the param, and it does: doc_name is the name of an already-open document and must match what list_documents shows. It also warns the resulting name can change, which affects later calls. Minor gap: no guidance on whether case or formatting variants are tolerated.

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?

The first sentence names a specific verb pair and resource: 'Close and re-open a document to pick up external file changes.' This is unmistakable against siblings such as list_documents, create_document, or edit_object, since none of them imply a disk-to-memory resync.

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

Usage Guidelines4/5

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

It gives a precise triggering condition: use it AFTER the .FCStd file was modified by something outside the GUI process, with a concrete example (headless freecadcmd script). It implicitly excludes GUI-side edits ('the open GUI document is otherwise unaware'), but names no alternative tool for other reload-adjacent needs.

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