Skip to main content
Glama
LBurny
by LBurny

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
create_documentA

Create a new FreeCAD document.

Args:
    name: Document name. FreeCAD may sanitize or deduplicate it, so read the actual name from the result.
cadA

Run one CAD modeling operation; the unified mutation entry point.

obj_name is the BASE object, except for loft/sketch/variables/datum_plane/hull (the NEW object); params go in obj_properties. Committed mutations are rollback-able session steps.

Args:
    obj_type: Object type for create_object, e.g. "Part::Box".
    ops: Operation dicts for batch.
    stop_on_error: Stop a batch at the first failure.
    description: One-line purpose of the step; the Steps panel's row label.

Reference: operation_help("<operation>").
execute_code_asyncA

Run Python on a background thread and return a task_id; poll the result with get_task_result.

The code must not touch the GUI: no FreeCADGui, views or selection, document objects, recompute or save; use execute_code for those. Output goes through task_print(...); print() is not captured.

Args:
    code: Background-safe Python code.
get_task_resultA

Poll the status and captured output of one execute_code_async task.

Args:
    task_id: Task ID returned by execute_code_async.

Returns: JSON {status: running | done | error, output, traceback}.
execute_codeA

Run Python in FreeCAD's GUI thread (FreeCAD/App, FreeCADGui, Part pre-imported); print() output is returned.

The run is transactional: a mutating snippet commits as one undoable step, a read-only run is not recorded.

Args:
    code: Code to run; start with a # comment naming the step, which becomes the step's row label and description.
    doc_name: Bind the transaction, step journal and App.ActiveDocument to this document; defaults to the session's document, else the process's home document.
get_viewA

Capture one document's view and return the saved PNG's path.

Costly in context: reserve it for visual checks; prefer get_objects or measure_geometry for numbers. Without width/height the long edge is capped at 384 px.

Args:
    view_name: Camera view, one of the nine names.
    width/height: Pixel size; a smaller image saves context.
    focus_object: Fit this object; the default frames everything.
    doc_name: Frame this document; another agent may have switched the foreground tab.
get_objectsA

List a document's objects, or read one object's full properties.

Args:
    obj_name: Omit to list the objects; pass a name to read that object instead.
    limit/offset: Page size and start index for the object list.
list_documentsB

List the open FreeCAD documents.

Args:
    limit/offset: Page size and start index.
sessionA

A modeling session bound to a document; cad() mutations become transaction-backed steps you can roll back or redo.

Actions: start (doc_name, create_document?) | status | get_steps (limit/offset) | rollback (to_step, force?) | redo (n?) | add_note (note, note_type?) | pause | resume (session_id) | list | complete (save?, save_path?, description?, tags?).

Reference: operation_help("session").
step_planA

Submit a modeling plan to the document's step journal without executing it.

Each step is a cad() argument dict and waits for release in the CADPilot Steps panel or via step_control.

Reference: operation_help("step_plan").
step_controlB

Review, run and undo the steps of a document's step journal.

Actions: run_next | run_all | run_to | rollback_to | reexecute | accept | reject | update | insert | replay | snapshot | clear_plan | reset (needs confirm=true) | status.

Reference: operation_help("step_control").
get_addon_logA

Read the addon's ring-buffer debug log (newest last) while FreeCAD is wedged or a call misbehaves.

Args:
    level: Minimum level: DEBUG, INFO, WARNING or ERROR.
    grep: Substring filter over message and detail.
    since_seq: Only records after this sequence number.
    limit: Max records (default 100).

Reference: operation_help("get_addon_log").
diagnoseA

Find out why CADPilot cannot reach FreeCAD; works while FreeCAD is down.

Probes the RPC port, the process, the addon install and its logs.

Args:
    host: FreeCAD host to probe; defaults to this server's --host.
    dismiss: Also close the modal dialog blocking every call (Cancel, nothing confirmed).

Reference: operation_help("diagnose").
save_patternA

Store a reusable modeling pattern for later recall; call this after a non-trivial approach worked.

Args:
    name: Short name, e.g. "flanged pipe via loft".
    description: What it does and when to use it.
    code: Optional Python snippet that implements it.
    tags: Retrieval tags.

Returns: The stored pattern_id.
recall_patternsA

Search the pattern memory for workflows or code like your task; do this before trial and error when your knowledge may not cover it.

Args:
    query: Keywords describing the task, e.g. "boolean cut holes cylinder".
    limit: Max results (default 3).

Returns: JSON list of matching patterns with code/steps.
operation_helpA

Full parameter reference for a cad() operation or another topic. Call it with an operation name such as "sketch", or with no argument for the topic list.

inspect_freecadA

Inspect the live FreeCAD Python API; the last resort when your own knowledge and recall_patterns are insufficient.

With doc_name and obj_name you get an object's TypeId, settable properties, methods and docstring. With dotted_name (e.g. "Part.makeLoft") you get a docstring or a member list.
measure_geometryA

Measure an object's Shape (the object must have one) to verify a design target numerically.

Returns: JSON volume_mm3, area_mm2, bbox, center_of_mass, element counts, is_valid, shape_type. Numbers carry 6 significant digits; the bbox is OCC's bound box, exact for planar shapes and within about 0.1 mm on curved ones.
get_topologyA

List an object's topology for selection: faces by area, edges by length, vertices by distance, largest first. The names (Face1, Edge3, ...) feed fillet, boolean, sketch-on-face and friends.

Args:
    element: Which kind to list: faces, edges or vertices.
    limit: Max entries (1 to 200, default 50).
    offset: How many entries to skip.

Returns: total, returned, and a '{element}' list of {index, name, type, area or length, center, planar-face normal}.
check_interferenceA

Check two objects for interference: the distance between them and their common volume. Use it to verify clearance or detect collisions.

Returns: JSON distance_mm, intersects, common_volume_mm3.
get_positioning_infoA

One face, edge or vertex in global coordinates: center, normal, axis, radius, endpoints; the Placement is already applied. Prefer it over get_topology for precise positioning before alignment or assembly.

Args:
    element: Which kind: face, edge or vertex.
    element_index: 0-based index; call get_topology to find the indices.
align_shapesA

Move an object so the chosen element aligns with an element of the target.

Args:
    element / element_index: Element on the object to move.
    target_element / target_element_index: Element on the target.
    mode: touch (face to face, normals opposing), center (centers coincide) or axis (cylindrical axes aligned).
    offset: Extra distance along the target normal; positive moves away.
get_anchorsA

List an object's assembly anchors in GLOBAL coordinates. Auto-derived ones (bbox_center/min/max, com, axis_mid/start/end for the dominant cylindrical face, face0..2_center for the largest planar faces) merge with set_anchors ones, and explicit wins. Call it before placing parts and plan mates from the returned numbers; never guess coordinates.

Returns: JSON with anchors as {name: {pos, dir, source: "auto" | "explicit"}}.
set_anchorsA

Define named anchors on an object. They persist with the document, move with its Placement, and the write becomes a modeling-session step.

Args:
    anchors: {name: {"pos": [x, y, z], "dir": [x, y, z] | null}}.
    replace: Replace all existing anchors instead of merging.
    coord_frame: local stores values as given; global converts them first, for global source coordinates.
assembleA

Snap parts together by matching named anchors in one transaction. For persistent joints use assembly_session.

Args:
    mates: Non-empty list of mate dicts.
    tolerance: Maximum allowed post-move residual in mm (default 0.1).
    stop_on_error: Stop at the first failed mate (mates already applied stay; nothing moves only if the FIRST mate fails).

Reference: operation_help("assemble").
verify_assemblyA

Audit a document's spatial health, read-only: floating parts, interferences, and anchor-pair distances. Hidden objects are skipped. Trust these numbers over a screenshot.

Args:
    checks: Optional anchor-pair distance checks.
    float_threshold: Gap in mm above which a part counts as floating (default 1.0).
    interference_min_volume: Smallest common volume in mm3 worth reporting.

Returns: JSON floating/interferences/checks lists and a summary.
assembly_sessionA

Persistent-joint assembly on FreeCAD's Assembly workbench; prefer it over the one-shot assemble when joints must survive later moves.

Workflow: start(ground=part), add_component(part), mate(a, b, joint_type, trim?), solve, verify, complete. Moving a parent part and re-solving moves the children. rollback(to_step) restores placements atomically. A mate ref is {"part": <name>} plus exactly one of face="FaceN", anchor=<name> or point=[x,y,z].

Reference: operation_help("assembly_session").

Prompts

Interactive templates invoked by user choice

NameDescription
asset_creation_strategy

Resources

Contextual data attached and managed by the client

NameDescription
operation-indexEvery cad() operation and tool topic served by operation_help.
pattern-memoryStored reusable modeling patterns (id, name, description, tags).

TDQS

A3.6/5.0

Scored across 27 tools

Disambiguation4/5

Most tools have distinct roles: cad vs execute_code, execute_code vs execute_code_async, and assemble vs assembly_session are clearly differentiated by scope and persistence. Some overlap remains among session, step_plan, step_control, and rollback-related operations, but descriptions provide enough guidance to select correctly.

Naming Consistency3/5

The surface is predominantly snake_case, but conventions are mixed: many tools use verb_noun (create_document, get_topology), while several use bare nouns or vague labels (session, cad, step_plan, assembly_session). It remains readable, but there is no single predictable pattern.

Tool Count2/5

At 27 tools the set is heavy for the rubric's 3-15 sweet spot, with multiple clusters covering overlapping concerns (sessions/step journals, code execution, assembly workflows). Several capabilities could likely be consolidated, so the count exceeds what feels well-scoped.

Completeness4/5

Coverage is broad: document creation/listing, modeling via cad, code execution, step planning/control, diagnostics, measurement, topology, alignment, anchors, and both one-shot and persistent assembly. Minor lifecycle gaps exist (e.g., explicit document close/delete or general import/export), but agents can work around them.

Maintenance

ActivityMaintained
ResponsivenessNo issues