Skip to main content
Glama

Add Part

add_part

Links a body, part file, or named object into a FreeCAD assembly and optionally places it by coordinates or mates it to a parent interface.

Instructions

Add a part to an assembly via App::Link.

source is one of: {"handle": ""} — link an in-doc body {"path": "/path/to/part.FCStd"} — link first body / subassembly {"path": "/path/to/part.FCStd", "object": "X"} — link named object placement: [x, y, z] or {position: [...], axis: [...], angle_deg: ...}. mate: place by aligning this part's published interface frame to an already-placed parent's, instead of (or after) a raw placement: {"child_iface": "", "parent": "<link-name|handle>", "parent_iface": ""}. Frames come from publish_interface.

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": {
      "assembly": "<assembly>",
      "source": "<source>"
    },
    "name": "add_part"
  }
}

Input Schema

NameRequiredDescriptionDefault
mateNo
nameNoPart
sourceYes
assemblyYes
placementNo
workspaceNoRun this call in this named workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this is a non-destructive, non-read-only, closed-world write, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: parts are linked (App::Link) rather than copied, and mate mode depends on frames published by publish_interface, a cross-tool prerequisite the agent must satisfy first.

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

Conciseness5/5

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

Purpose is front-loaded in the first clause, then variants are presented as a compact grammar block rather than prose. Every line adds information; nothing is repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six parameters, nested objects, and no output schema, the description covers the input side well but says nothing about what comes back — no link name/handle to reuse in later calls, no behavior on name collisions or unresolvable paths. For a creation tool with no output schema, that's a meaningful gap.

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 description coverage is only 17%, so the description must carry the weight — and it does for the hardest parameters, spelling out three source shapes, both placement forms (array vs position/axis/angle_deg), and the mate object's three keys. `assembly` and `name` are left to the schema, but those are the low-risk parameters.

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?

Opens with a specific verb, resource, and mechanism: 'Add a part to an assembly via App::Link.' The App::Link detail distinguishes it from copy/import style siblings, and the grammar blocks that follow make the operation's shape unambiguous.

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?

The mate/placement sections give real conditional guidance ('instead of (or after) a raw placement') and the three source forms map to distinct situations. What's missing is sibling-level routing — nothing tells the agent why to pick this over add_primitive, copy_shape, or merge_assembly.

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