Skip to main content
Glama
TommeCAD FreeCAD MCP

TommeCAD FreeCAD MCP

sketch_trim

Trims a line or circular arc at a sketch-local reference point, using explicit sketch and geometry indices to make precise sketch edits.

Instructions

Trim a line or circular arc at a sketch-local reference point. FreeCAD 1.1 rejects include_axes=true.

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": {
      "sketch_name": "<sketch_name>",
      "geo_idx": "<geo_idx>",
      "x": "<x>",
      "y": "<y>"
    },
    "name": "sketch_trim"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesx: mm, sketch_local_xy.
yYesy: mm, sketch_local_xy.
geo_idxYesSketch geometry index, zero-based; FreeCAD external axis indices may be negative.
doc_nameNoInternal document Name, never Label/path. Omitted/null uses active document (legacy); pass explicitly.
sketch_nameYesInternal object Name in the selected document, never Label; must have the type required by this tool.
include_axesNoWhether trim may use sketch axes as cutters; unsupported and rejected by FreeCAD 1.1.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.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 full burden and does a decent job: it discloses the FreeCAD 1.1 include_axes rejection, an error taxonomy (invalid_arguments, transaction_conflict, operation_failed, execution_timeout), and a strong operational warning that timeout is not cancellation and mutations must not be blindly retried. It stops short of saying what trim does to the geometry itself (delete vs. split the remainder, effect on attached constraints, reversibility), which is the key behavioral fact for a mutation tool.

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?

Purpose is front-loaded in the first sentence, followed by a short constraint note and a compact contract block. It is information-dense with little filler, though the enumerated error list and the vague "Legacy return shape preserved" tail lean toward boilerplate.

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 6-parameter mutation tool with a full input schema and an output schema, the description covers units, naming contract, error surface, and retry safety. The remaining gap is semantic effect on the sketch (what exactly gets removed and how constraints are affected), which matters given zero annotations.

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 the schema already documents x/y coordinate system, negative external-axis indices, and internal-Name semantics. The description only reinforces this with "explicit internal names recommended" and the unit-override rule, adding marginal meaning beyond the schema; baseline 3 applies.

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?

Names a specific verb ("Trim") acting on specific geometry ("a line or circular arc") at a defined location ("sketch-local reference point"). That is enough to separate it from every listed sibling, all of which are add_* or constrain_* tools, though the description never states that distinction explicitly.

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?

Usage is only implied: an agent infers it should call this when it wants to cut a line/arc at a point. There is no when-to-use vs. when-not, no precondition (e.g. geometry must intersect or a reference must exist), and no named alternative. Useful side-guidance exists ("explicit internal names recommended", include_axes unsupported), but that is parameter advice, not selection 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