Skip to main content
Glama

create_sketch

Creates a 2D sketch on XY, XZ, or YZ planes with lines, circles, arcs, polylines, and optional constraints to define geometry for CAD operations.

Instructions

Create a 2D sketch (FreeCAD Sketcher with a real constraint solver). plane XY (x,y; normal +Z), XZ (sketch x,y map to world x,z; normal -Y) or YZ (maps to world y,z; normal +X); offset shifts the plane along its normal. geometry items (sketch coordinates in mm; index = position in the list, starting 0): {"type":"line","p1":[x,y],"p2":[x,y]}, {"type":"circle","center":[x,y],"radius":r}, {"type":"arc","center":[x,y],"radius":r,"start_deg":a,"end_deg":b} (counter- clockwise), {"type":"polyline","points":[[x,y],...]} (closed polygon, expands to one line per side). Add "construction":true for reference geometry. Closed loops become faces; a loop inside another becomes a hole. constraints (optional, reference geometry by index geo/geo2, point ids pos 1=start, 2=end, 3=centre): coincident (geo,pos,geo2,pos2), horizontal, vertical, parallel, perpendicular, equal, tangent, radius/diameter (geo,value), length (geo,value), distance_x/distance_y (geo,value), lock (geo,pos,x,y). Returns closed/open wire counts and solver DOF (0 = fully constrained). Next: pad, pocket, revolve, loft or sweep.

Input Schema

NameRequiredDescriptionDefault
docYes
nameYes
planeNoXY
offsetNo
geometryNo
constraintsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it explains plane orientation/normals, offset direction, construction-geometry semantics, and that closed loops become faces with nested loops becoming holes. It also explains the return signal (closed/open wire counts, DOF 0 = fully constrained). It omits that this mutates the document by adding an object, and says nothing about required preconditions or failure modes.

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?

Verb and resource are front-loaded, and the dense geometry/constraint reference is justified by the empty schema. The block is cramped and run-on in places, but almost every clause carries operational detail rather than filler.

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 complex 6-parameter tool with an output schema and no annotations, the definition covers the hard parts: the geometry DSL, constraint vocabulary, and DOF interpretation. Gaps remain around `doc`/`name` semantics, document-existence preconditions, and the fact that a new object is added to the document.

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 coverage is 0%, so the description must compensate and largely does: `plane` values are mapped to world axes and normals, `offset` direction is defined, and the geometry and constraint item shapes are spelled out field-by-field including index and point-id conventions. Only `doc` and `name` go undefined, though their meaning is largely self-evident.

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?

The opening sentence names a specific verb and resource ("Create a 2D sketch") and immediately qualifies it with the engine (FreeCAD Sketcher with a real constraint solver), which separates it from add_primitive and the downstream solid features. An agent can tell this is the 2D-profile entry point rather than a 3D operation.

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 closing line "Next: pad, pocket, revolve, loft or sweep" explicitly positions this tool as the prerequisite for the sibling feature tools, which is real routing guidance. It stops short of saying when NOT to use it (e.g. versus add_primitive for a quick 3D shape) or what prerequisites like an existing `doc` are required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.