Skip to main content
Glama
TommeCAD FreeCAD MCP

TommeCAD FreeCAD MCP

execute_batch

Execute or preview validated batches of allowlisted CAD operations with explicit document ownership; atomic batches roll back on failure, while nonatomic batches stop at the first error.

Instructions

Execute or preview allowlisted CAD operations with explicit document ownership.

Atomic batches use one existing document and one Undo record. Nonatomic
batches may span documents, stop at first error and retain earlier successes.
Preview never executes geometry. Results report each step as planned,
succeeded, failed, rolled_back, unknown or not_executed; inspect status.
Deletion accepts only unreferenced leaf objects. No persistent preview token,
retries, distributed transaction, file rollback or guaranteed kernel cancel.
Errors: invalid_batch, transaction_conflict, dependency_conflict and reference/
kernel/transport errors. A timeout means unknown outcome, never automatic retry.

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": {
      "steps": "<steps>"
    },
    "name": "execute_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYesOrdered 1..100 steps, max 65536 UTF-8 JSON bytes. All validated before mutation.
atomicNoTrue: one existing document, one Undo record and rollback. False: multiple documents, stop on first error.
previewNoValidate and describe effects without executing geometry or mutating documents.

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

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the entire behavioral burden and does so thoroughly: undo/rollback semantics, stop-at-first-error with retained successes, preview never touching geometry, deletion limited to unreferenced leaf objects, and explicit non-guarantees (no persistent preview token, no retries, no distributed transaction, no file rollback, no guaranteed kernel cancel). It also names the per-step status values and warns that a timeout means unknown outcome and must never trigger blind retry.

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 key semantics are front-loaded well, but the text appears to be two concatenated blocks that repeat material: error sets are listed twice with overlapping entries (transaction_conflict appears in both), and the timeout-is-not-cancellation warning is stated twice. That redundancy costs space without adding information.

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?

For a batch mutation tool with an output schema already present, the description covers everything an agent needs: mode selection, ownership and unit rules, rollback behavior, step status vocabulary, and failure/timeout handling. Return-shape details are correctly left to the output schema.

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 100%, so the baseline is 3; the description adds real value on top by specifying unit conventions (mm, mm^2, mm^3, angles in deg), noting that field units override defaults, and recommending explicit internal names. The remaining ambiguity is that the error taxonomy in the prose is duplicated and partly inconsistent with the schema's contract block, adding noise rather than meaning.

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 sentence gives a specific verb (execute/preview) plus resource (allowlisted CAD operations) and a scoping constraint (explicit document ownership). The operation enum and atomic/nonatomic framing make the scope concrete. It does not explicitly name a sibling it is not (e.g. start_batch_job for async work), so it falls just short of full differentiation.

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 clearly frames the two modes an agent must choose between: atomic (one document, one Undo record, rollback) versus nonatomic (multi-document, stop at first error, keep earlier successes), and says preview validates without executing geometry. What is missing is an explicit when-not/alternative such as 'use boolean_cut directly for a single operation' or a pointer to the async job sibling.

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