Skip to main content
Glama

add_sketch_constraint

Add geometric or dimensional constraints to a sketch. Specify constraint type, references, and values to define relationships and dimensions.

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.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does not state what happens on invalid constraints, whether the sketch must be open, or any side effects, reversibility, or error behavior. It only describes parameter formats.

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?

Concise, front-loaded with the purpose, and organized with clear labeled sections for type, refs, and value. Every sentence adds useful information without redundancy.

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?

For a constraint-adding tool with four parameters and no output schema, the description adequately covers parameter semantics but omits usage context and behavioral details. It lacks prerequisites, expected outcomes, and error handling. It is minimally sufficient for an agent that already understands the modeling context.

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 it does well: it enumerates all valid type values, explains the refs structure as [geom_idx, vertex_role] pairs with role codes, and specifies that value uses mm or radians. It could further clarify how many refs each constraint type requires, but this is substantially more than the raw schema provides.

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?

States a specific verb and resource: 'Add a constraint to a sketch.' The purpose is clear enough to distinguish from geometry-adding siblings like add_sketch_geometry. However, it does not explicitly contrast itself with other sketch-related siblings such as close_sketch or add_sketch_external.

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?

Provides no guidance on when to use this tool versus alternatives, nor prerequisites such as requiring an open sketch. It only implies usage through the description of constraint types. No exclusions or context are given.

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