Skip to main content
Glama

Add Primitive

add_primitive

Create box, cylinder, or sphere primitives in the active FreeCAD document with dimensions, optional placement and label; returns a handle for later boolean operations.

Instructions

Add a primitive to the active document.

kind: 'box' (uses w, d, h), 'cylinder' (uses r, h), or 'sphere' (uses r). placement: optional [x, y, z] mm translation. name: optional human-facing name. It sets the object's LABEL — what list_objects, bom_extract and the drawing/manifest layers display — and leaves the internal FreeCAD Name alone, since handles and register_handle key off Name and it must stay unique and stable. Omit it and the label stays the type default ('Box' / 'Cylinder' / 'Sphere'), which BOM and designation checks read as an unnamed generic solid. Returns {handle, name, label, volume}: name is FreeCAD's internal id and label is the display name (equal to name when you passed none). The handle (e.g. 'box_1') is how you reference this object in subsequent boolean_op calls.

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": {
      "kind": "<kind>"
    },
    "name": "add_primitive"
  }
}

Input Schema

NameRequiredDescriptionDefault
dNo
hNo
rNo
wNo
kindYes
nameNo
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
Behavior5/5

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

Goes well beyond the annotations: explains that `name` sets the LABEL while leaving the internal FreeCAD Name untouched (critical for register_handle/boolean_op stability), states the default label consequence for BOM/designation checks, and discloses the returned fields and how the handle is consumed downstream. Rich context for a non-destructive write 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?

Front-loaded with purpose, then per-parameter structure and a returns section — well organized and information-dense. The naming paragraph is a bit long, but every clause adds real value about label vs internal Name behavior.

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 output schema, the description adequately explains the returned object and handle usage, and discloses the naming side effects. Minor gaps remain: dimension defaults/units and the `workspace` parameter semantics are not addressed.

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?

With only 13% schema coverage the description must carry the load, and it does for the high-value params: `kind` values map to which dimensions apply (w/d/h, r/h, r), and `placement`/`name` get detailed semantics. It still leaves defaults (w/d/h=10, r=5) and the `workspace` parameter unexplained, and units are only implied via placement mm.

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?

States a specific verb+resource ('Add a primitive to the active document') and enumerates the concrete variants (box/cylinder/sphere) with their dimension mappings. An agent can immediately tell it apart from the many specialized add_* siblings (add_gear, add_spring, make_body).

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 implied by 'primitive solid' vs the specialized siblings, but there is no explicit when-to-use/when-not or routing to alternatives (e.g., vs make_sketch+pad, or when to prefer a catalog part). The agent must infer selection conditions.

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