Skip to main content
Glama

add_sketch_relation

Add a geometric constraint like horizontal, vertical, coincident, tangent, equal, or fix to sketch segments to make the sketch fully defined.

Instructions

Relación de croquis — agrega una restricción geométrica (horizontal, vertical, coincident, tangent, equal, fix) a uno o dos segmentos del croquis activo. ESTA es la pieza que faltaba para que un croquis quede TOTALMENTE DEFINIDO y no "nade" 1-2 mm cuando SolidWorks resuelve sus relaciones automáticas.

Uso típico CSWA: tras dibujar el outline con create_line/create_arc, fija las aristas planas con 'horizontal'/'vertical' y combínalas con add_sketch_dimension (cotas gobernantes) hasta que el croquis se vuelva negro (totalmente definido). Así A/B/C quedan paramétricas y un cambio es una sola llamada a modify_dimension — sin reconstruir desde cero.

[en: Sketch relation — add a geometric constraint (horizontal/vertical/ coincident/tangent/equal/fix) to one or two segments of the active sketch. This is what makes a sketch FULLY DEFINED so it stops drifting 1-2 mm under SW's auto-relations.]

Args: relation: one of "horizontal", "vertical", "coincident", "tangent", "equal", "fix". horizontal/vertical/fix take 1 point; coincident/ tangent/equal take 2. entity_points_mm: list of [x, y] (or [x, y, z]) points in mm, each lying ON a target sketch segment (the closest segment is picked).

Returns {relation, constraint, sketch_name, points}.

Requires the sketch in EDIT mode (call after the geometry, before extrude_sketch closes it). No rebuild — locked in on the next exit.

Related: add_sketch_dimension (driving cotas); add_sketch_fillet / add_sketch_chamfer (corner geometry).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
relationYes
entity_points_mmYes
Behavior3/5

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

Describes effect (fully defined, stops drifting), no rebuild until next exit, and which relations take 1 or 2 points. Missing error conditions or behavior if relation already exists. With no annotations, carries burden but not exhaustive.

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?

Well-structured with bilingual intro, Args, Returns, and context. Slightly redundant due to dual languages, but front-loaded with essential info and no wasted sentences.

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?

Given 0% schema coverage, no annotations, and no output schema, description covers purpose, parameters, return value, and usage context. Missing error handling or validation details, but adequate for most uses.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, description fully explains both parameters: relation values and entity_points_mm format (list of points). Adds meaning beyond schema by specifying number of points per relation type.

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?

Description clearly states it adds geometric constraints to sketch segments, lists specific relations, and explains its role in making sketches fully defined. It distinguishes from sibling tools like add_sketch_dimension and add_sketch_fillet.

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?

Provides usage context: typical CSWA workflow, when to use (after drawing, before extrude), and requires sketch in edit mode. Implicitly differentiates from dimensioning and filleting but lacks explicit when-not-to-use.

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

Install Server

Other Tools

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/danielproxd2/MCP_CAD'

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