Skip to main content
Glama
TommeCAD FreeCAD MCP

TommeCAD FreeCAD MCP

save_document_safe

Saves a FreeCAD document to its existing or specified .FCStd path while blocking accidental overwrites. Requires explicit overwrite permission and reports the possible artifact path if a write fails.

Instructions

Save with file_exists protection. Files are outside Undo/rollback; failed writes report possible artifact path.

Contract: explicit internal names recommended. Length mm, area mm^2, volume mm^3; field units override defaults. Errors: invalid_arguments, document_not_found, object_not_found, transaction_conflict, operation_failed, execution_timeout; transport failures are possible. Timeout is not cancellation: never blindly retry mutations. Legacy return shape preserved.

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

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute .FCStd destination; omit to save to the document's existing path.
doc_nameYesExplicit internal Name; no Label or active-document fallback.
overwriteNoExplicit permission to overwrite an existing file, including ordinary Save.

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNo
statusYes
warningsNo
referencesNo
contract_versionNo1.0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description discloses important behavior: writes are outside Undo/rollback, failed writes report a possible artifact path, specific error classes are listed, and timeout/cancellation retry caution is included. It leaves some edge details unstated, such as permission requirements and exact file-exists failure semantics, but carries much of the burden well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The safety behavior is front-loaded and the error/retry points earn their place, but the 'Length mm, area mm^2, volume mm^3' contract is unrelated to saving a document and dilutes focus. 'Legacy return shape preserved' is also marginal when an output schema exists.

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 mutation tool with no annotations and an existing output schema, the definition covers rollback isolation, failure artifacts, error classes, and retry behavior. It omits some save-specific edge semantics such as how overwrite interacts with file_exists protection, but is broadly complete.

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 100%, so path, doc_name, and overwrite are already fully documented by the schema. The description only adds a general recommendation for explicit internal names and unit boilerplate that does not clarify these parameters.

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?

The opening 'Save with file_exists protection' states a specific verb, resource, and safety trait. However, it never names or differentiates the sibling save_document, leaving the agent to infer why this safe variant exists.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no alternative such as save_document is named. 'Explicit internal names recommended' and the retry warning are operational notes rather than routing guidance.

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