Skip to main content
Glama
NejcDvorsek

SolidWorks MCP

by NejcDvorsek

add_mate

Mate faces of two components or add multiple mates in one call; choose coincident, distance, parallel, perpendicular, angle, or concentric and receive per-mate results.

Instructions

Mate a face of one component to a face of another, or add several mates in one call.

comp_a/comp_b are component names ('Bed' or 'Bed-1'; 'Leg-1/Thigh-1' inside a sub-assembly). face_a/face_b select a face in that component's OWN frame: by direction "+x"/"-x"/"+y"/... (optionally "+y:inner" for the cavity side of a hollow part), by its list_faces(component=...) index, "#5", or by a point on it, "@x,y,z" (a hole's wall: its centre plus the radius along x). mate_type between planar faces: "coincident", "distance" (distance_mm), "parallel", "perpendicular" or "angle" (angle_deg between the faces' normals, 0..180); "concentric" between two cylindrical faces (a pin in a hole, a hinge axis), leaving the turn about the axis free. flip takes the other solution: the mirror side of a distance, the other turning direction of an angle. A distance or angle mate returns its dimension: drive it with set_dimension, or step it with check_motion. An angle mate's dimension then turns the joint the whole way round, past 180 and below 0 (-30 is 30 the other way, the same turn as 330). The result is measured back after the rebuild; a mate that does not hold is removed and the components are put back.

Several at once: mates=[{"comp_a": "Bolt-1", "face_a": "#3", "comp_b": "Plate-1", "face_b": "#12", "mate_type": "concentric"}, ...], each with the arguments above. stop_on_error=True stops at the first that fails; the mates before it stay. Returns a result per mate (its name and dimension, or the error), how many were added, failed and not tried, and the mate count.

Input Schema

NameRequiredDescriptionDefault
flipNo
matesNo
comp_aNo
comp_bNo
face_aNo
face_bNo
angle_degNo
mate_typeNocoincident
distance_mmNo
stop_on_errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.16.3

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that results are measured after rebuild, a failing mate is removed and components restored, flip's mirror/opposite behavior, and stop_on_error semantics including that prior mates persist. It also describes the return payload (per-mate result, counts, mate count), which is critical given there is no output schema.

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?

The purpose is front-loaded and the body is dense with useful detail rather than filler. It is long, but that length is largely justified by the ten undocumented parameters and the need to specify face addressing, mate types, and batch behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, zero-annotation, no-output-schema tool, the description covers invocation, face syntax, mate-type semantics, batch error behavior, and return shape. An agent has enough to call it correctly and interpret results without guessing.

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?

Schema coverage is 0%, so the description must compensate fully, and it does: it explains comp_a/comp_b naming conventions, face_a/face_b addressing (direction, index, '#5', '@x,y,z', cavity suffix), mate_type values, distance_mm, angle_deg range and wraparound semantics, flip, mates array shape, and stop_on_error. Every one of the ten parameters is given meaning beyond its bare name.

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?

States a specific verb and resource ('Mate a face of one component to a face of another') plus the batch variant ('add several mates in one call'), which cleanly separates it from siblings like delete_mate, suppress_mate, and set_dimension. An agent can identify the operation without opening the schema.

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?

Explains the mate types and when each applies (planar vs cylindrical, concentric leaving rotation free), and routes follow-up work to set_dimension and check_motion. It does not explicitly say when to prefer a single call over a batch, but the context is clear enough for selection.

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