Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
BRICS_MCP_INNoBridge input file path/tmp/mcp_bricscad.in
BRICS_COMPACTNoSet to 1 to expose only 14 essential tools (~1k schema tokens instead of ~7k) for clients that inject every schemaoff
BRICS_DISPLAYNoX display where BricsCAD runs (e.g. :77 for a nested Xephyr)$DISPLAY
BRICS_MCP_OUTNoBridge output file path/tmp/mcp_bricscad.out

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
draw_batchA

Execute many drawing ops in ONE call - ALWAYS prefer this over single tools for 3+ entities. Each op is {"type":...} + params (optional "layer"). Types: line(x1,y1,x2,y2) circle(cx,cy,radius) arc(cx,cy,radius,start_angle,end_angle) rectangle(x1,y1,x2,y2) polyline(points,closed) point(x,y) text(x,y,text,height,rotation) mtext(x,y,text,width,height) ellipse(cx,cy,major_dx,major_dy,ratio) layer(name,color: set current) center_mark(x,y,size) bolt_circle(cx,cy,pcd,hole_dia,count) hatch(points,pattern,scale,angle) dim_linear/dim_aligned(x1,y1,x2,y2,line_x,line_y) polygon(cx,cy,sides,radius) slot(x1,y1,x2,y2,width) rounded_rect(x1,y1,x2,y2,radius). Returns OK n= h=.

draw_lineA

Line from (x1,y1) to (x2,y2).

draw_circleC

Circle at (cx,cy) with radius.

draw_arcC

Arc: center, radius, start/end angles in degrees (CCW).

draw_ellipseB

Ellipse: center (cx,cy), major-axis endpoint (major_dx,major_dy) relative to center, ratio=minor/major.

draw_rectangleA

Rectangle (closed polyline) between opposite corners.

draw_polylineB

Polyline through [[x,y],...]; closed=true to close it.

draw_pointC

Point at (x,y).

draw_textC

Single-line text at (x,y); rotation in degrees.

draw_mtextB

Multiline text; (x,y)=top-left corner, width=wrap width.

bolt_circleC

N holes on a pitch-circle diameter (pcd), positions computed server-side; one call.

center_markC

Center-mark cross at (x,y).

hatch_polygonC

Fill a closed polygon with a real HATCH entity (pattern ANSI31, SOLID, ...).

polygonA

Regular polygon: center, number of sides, circumscribed radius, rotation degrees.

slotA

Slot/obround (asola, oblong hole): rounded-end slot between the two arc centers, given width. Use this for slots - NOT a rectangle.

rounded_rectC

Rectangle with rounded corners (raccordato), single polyline.

draw_splineB

Smooth spline through the given points [[x,y],...].

draw_xlineA

Infinite construction line through (x,y) at angle degrees.

draw_donutB

Donut (filled ring; inner_dia=0 gives a filled dot).

chamfer_polylineA

Chamfer (bevel) ALL corners of a polyline with equal distances.

hatch_circleB

Hatch a circular area (creates the circle boundary + HATCH).

offset_entityB

Offset a curve by distance toward the side of point (toward_x,toward_y). CAD does the math.

fillet_polylineB

Fillet (round) ALL corners of a polyline with the given radius. CAD does the math.

mirror_entitiesA

Mirror entities across the axis (x1,y1)-(x2,y2). Draw half, mirror the rest. handles=['selection'] uses the GUI selection.

array_rectC

Rectangular array of entities: rows x cols with spacings. handles=['selection'] uses the GUI selection.

array_polarA

Polar array: copy entities count times around (cx,cy) over angle degrees. handles=['selection'] uses the GUI selection.

get_extentsA

Bounding box of the whole drawing or of one layer: cheap spatial check, no screenshot.

entity_lengthB

Length (and area if closed) of a curve: line, arc, circle, polyline, spline.

check_intersectionC

Do two entities intersect/overlap? Returns intersection points. The anti-collision check.

solid_volumeC

Volume and centroid of a 3D solid.

entity_pointsB

Key points of an entity (ends/mid/center/radius/vertices): connect geometry without math.

create_layerA

Create a layer with ACI color (1=red 2=yellow 3=green 4=cyan 5=blue 6=magenta 7=white).

set_current_layerB

Set current layer (created with color if missing).

set_current_colorA

Set current entity color (ACI code; 256=ByLayer).

list_layersB

List layers with colors.

insert_blockB

Insert a block (or .dwg file) at (x,y); rotation in degrees.

create_blockA

Define a reusable block from existing entities (they become the definition; re-place with insert_block).

text_styleA

Create/set a text style with a font (e.g. isocpeur.ttf for ISO drawings) and make it current.

list_blocksA

List block definitions in the drawing.

erase_lastA

Delete the last created entity.

erase_entityB

Delete an entity by handle, or handle='selection' for the user's GUI selection.

move_allA

Move ALL entities by (dx,dy).

move_entityA

Move entity by (dx,dy); handle='selection' moves the user's GUI selection.

copy_entityB

Copy entity with offset (dx,dy); handle='selection' copies the user's GUI selection.

rotate_entityA

Rotate one entity (or 'selection') around a base point by angle degrees (CCW).

scale_entityB

Scale one entity (or 'selection') from a base point by factor.

set_entity_propsB

Change properties of an entity (or 'selection'): layer, color (ACI, 256=ByLayer), linetype.

explode_entityB

Explode a block/polyline/dimension into its components.

join_entitiesA

Join touching lines/arcs/polylines into one polyline (first handle = source).

break_entityA

Break an entity between two points (opens a gap; same point twice = split only).

rotate_allA

Rotate ALL entities around a base point by angle degrees (CCW).

scale_allB

Scale ALL entities from a base point by factor.

dim_linearA

Linear (horiz/vert) dimension between two points; (line_x,line_y)=dimension line position.

dim_alignedB

Aligned (parallel) dimension between two points; (line_x,line_y)=dimension line position.

dim_radiusA

Radius dimension (R...) on a circle/arc by handle; angle=where it points (deg), offset=leader length factor.

dim_diameterB

Diameter dimension (D...) on a circle/arc by handle.

dim_angularC

Angular dimension: vertex + a point on each side + dimension arc position.

undoA

Undo the last N operations (a whole draw_batch counts as ONE).

redoB

Redo the last undone operation.

get_selectionA

What the user has currently selected in the GUI (count, handles, types, layers). Enables 'do X on what I selected'.

select_byA

Select+highlight entities by type and/or layer (wildcards ok: layer='MUR*'). Returns handles; user SEES the selection.

select_windowA

Select+highlight by rectangular area: crossing=false only fully-inside, true also touching. Optional type/layer filter.

drawing_infoA

Total entity count (OK n=).

get_entity_countsA

Instant census: entity count per type (cheap; call this FIRST to understand a drawing).

layer_infoA

Per-layer report: object count, color, linetype, frozen/locked.

list_entitiesA

List entities (type, handle, layer), paginated; optional type/layer filter (wildcards ok). Use get_entity_counts first on big drawings.

get_entityC

Raw DXF data of an entity by handle.

get_variableA

Read a system variable (e.g. CLAYER, DIMSCALE).

set_linetypeA

Assign a linetype to a layer: CENTER (chain, for axes), HIDDEN, DASHED, PHANTOM, CONTINUOUS. Loads it if missing; ltscale>0 sets global linetype scale.

set_dim_styleB

Appearance of NEW dimensions: text height, arrow size, decimal places, overall scale.

leaderA

Leader arrow: points at (x,y) [the feature], text lands at (end_x,end_y). For callouts like '4x D10'.

hatch_islandsA

HATCH the outer closed polygon SKIPPING the island polygons (hatch around holes). outer=[[x,y],...], islands=[[[x,y],...],...].

trim_entityC

Trim: remove the portion of the entity at pick point, cut by the cutting entity.

extend_entityC

Extend: lengthen the entity (picked near the end to extend) until the boundary entity.

zoom_extentsA

Zoom to drawing extents.

zoom_windowB

Zoom to a rectangular window.

regenB

Regenerate the view.

save_as_dwgB

Save the drawing as DWG (2018) to path.

export_pdfB

Export the drawing to PDF at path (the final deliverable).

render_viewA

Render the drawing to a clean PNG (no UI chrome) for visual inspection. Pass a window (x1,y1,x2,y2) to frame a region; omit for current view.

export_dxfA

Export the drawing as ASCII DXF to path.

solid_boxA

3D solid box: base corner (x,y,z), sizes dx,dy,dz (dz along Z).

solid_cylinderB

3D solid cylinder: base center (cx,cy,z), radius, height along Z.

solid_sphereC

3D solid sphere: center (cx,cy,z), radius.

solid_coneA

3D solid cone: base center (cx,cy,z), base radius, height along Z.

solid_wedgeB

3D solid wedge (ramp): base corner (x,y,z), sizes dx,dy,dz.

solid_torusC

3D solid torus: center (cx,cy,z), ring radius, tube radius.

sweep_profileB

Sweep a closed 2D profile along a path curve -> 3D solid (pipes, rails, gaskets).

slice_solidB

Slice a 3D solid with a vertical plane through 2 points; keep='both' or a point-side 'x,y'.

extrude_profileA

Extrude a CLOSED 2D profile (polyline/circle) into a 3D solid, height along Z. The 2D->3D bridge.

revolve_profileA

Revolve a CLOSED 2D profile around axis (x1,y1)-(x2,y2) by angle degrees (turned parts).

bool_unionC

Union 3D solids into one.

bool_subtractA

Subtract solids from solids (holes, pockets). keep = the part, subtract = the tools.

bool_intersectC

Keep only the intersection of 3D solids.

view_3dA

3D view: direction iso/iso2/top/front/back/left/right; shade wireframe/hidden/flat/gouraud. Zooms extents.

flatshot_viewA

Auto-generate a 2D drawing view (block) of ALL 3D solids, projected from direction (front/top/right/left/back/iso), lower-left corner placed at (x,y). Model in 3D, get the 2D view for free. Returns block handle+size.

view_planA

Back to flat 2D view (top, wireframe, zoom extents). Use after 3D work.

purge_drawingA

Purge unused layers, blocks, linetypes, styles from the drawing.

run_commandA

Run any BricsCAD command; tokens list, "" = Enter. Prefer dedicated tools when they exist.

run_lispA

Eval AutoLISP code (multi-line and multiple expressions OK); set (setq MCPRES ...) to return data.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Psalmustrack/lambdacad-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server