Skip to main content
Glama

Save Document

save_document
Destructive

Saves the active FreeCAD document to a .FCStd path and, by default, hides consumed producer-input objects to prevent double-rendered intermediates on reopen. Optionally embeds provenance.

Instructions

Save the active document to the given .FCStd path.

visibility_hygiene (default True): before saving, hide any object that has been consumed as a producer-input (the Base/Tool of a Cut, the BaseFeature of a Body, every feature inside a Body's Group, etc.). Without this the re-opened doc double-renders intermediates on top of the final shape — a failure mode that looks identical to broken geometry. Pass False to keep explicit set_visibility overrides intact. attach_provenance: embed this document's journal_export record (PRIVACY.md).

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": {
      "path": "<path>"
    },
    "name": "save_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
workspaceNoRun this call in this named workspace
attach_provenanceNo
visibility_hygieneNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.7
    • addedInput schema / properties / attach_provenance
      Added value: +{
      +  "default": false,
      +  "title": "Attach Provenance",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Goes well beyond the annotations by explaining that visibility_hygiene mutates object visibility before writing, describing the exact failure mode it prevents (intermediates double-rendering, mistaken for broken geometry), and noting that provenance embedding carries privacy implications (PRIVACY.md). It does not say whether saving to an existing path overwrites the file, which matters given destructiveHint=true.

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-loads the core action in the first sentence, then gives one justified paragraph per non-obvious parameter. The visibility_hygiene explanation is longer than typical but every clause (mutation, failure mode, opt-out) carries information an agent needs.

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 4-parameter mutating tool with no output schema, the description covers what changes on disk, the side effects on document state, and provenance. The remaining gaps — overwrite behavior on an existing path, error handling, and how workspace interacts with path — are minor but real for a destructive write.

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 only 25% (only workspace is documented in the schema), so the description must compensate — and it does for the two non-obvious booleans: visibility_hygiene gets a full rationale and opt-out condition, and attach_provenance is tied to the journal_export record and PRIVACY.md. The path parameter's overwrite/extension semantics remain unstated, keeping it below a 5.

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 (save) and resource (the active document) plus the target format (.FCStd path), which is more precise than the title. It does not explicitly distinguish itself from siblings like export_shape or journal_export, so an agent must infer that this writes the native document rather than exporting.

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 tool's usage is implied (save the active document) and there is a clear conditional for one parameter — pass False to preserve explicit set_visibility overrides — but no explicit statement of when to prefer this over export_shape, journal_export, or close_document.

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