Skip to main content
Glama

Add Sketch Constraint

add_sketch_constraint

Add geometric or dimensional constraints to sketch entities, enforcing relationships like coincidence, distance, angle, and tangency for precise parametric modeling.

Instructions

Add a constraint to a sketch.

type: Coincident, Horizontal, Vertical, Distance, DistanceX, DistanceY, Radius, Diameter, Equal, Parallel, Perpendicular, Tangent, Block, Symmetric, Angle. refs: list of [geom_idx, vertex_role] pairs. vertex_role: 0=edge, 1=start, 2=end, 3=center. value: numeric value (mm or radians) for dimensional constraints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refsYes
typeYes
valueNo
sketchYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already indicate this is not read-only (readOnlyHint=false), and the description confirms the mutating 'Add' behavior without contradicting annotations. However, it adds no deeper behavioral context such as whether the constraint is resolved immediately, whether existing constraints are replaced, or what side effects may occur. The non-destructive nature is clear enough for a simple add operation.

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?

The description is compact and well-structured: a one-line purpose followed by a concise parameter legend. Every line conveys useful information without filler, and the most important parameters are front-loaded.

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?

The description gives enough to attempt a call, but it omits important operational details: which constraint types require value, how many refs each constraint type expects, and how the sketch parameter identifies a sketch. For a medium-complexity CAD mutation with no output schema and no schema-level descriptions, this is adequate but has clear gaps.

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 0%, so the description must compensate, and it largely does: it enumerates valid constraint types, explains refs as [geom_idx, vertex_role] pairs with numeric role meanings, and clarifies that value is for dimensional constraints in mm or radians. It does not describe the sketch parameter, but the other three parameters are significantly clarified beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb and resource: 'Add a constraint to a sketch.' The listed constraint types and refs format make the tool's purpose concrete. It does not explicitly distinguish itself from sibling tools like add_sketch_geometry, but the action and target are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives, nor does it mention prerequisites such as having an active sketch or existing geometry. The intended context is only implied by the name and first sentence, so an agent gets little help choosing it correctly among the many sketch-related siblings.

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