Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Add GD&T Frame

add_gtol

Adds a GD&T feature control frame to an active drawing, attaching it to a dimension or placing it with an optional leader.

Instructions

Add a GD&T feature control frame to the active drawing, e.g. position Ø0.2 (M) to A|B|C.

Attach it to a drawing dimension (dimension_view + dimension_name; the frame sits under the dimension's text, the usual place for a hole's position tolerance), or place it at x_mm/y_mm with an optional leader to the edge at attach_x_mm/attach_y_mm. Add the datums it refers to with add_datum_tag. Needs: an open, active drawing. Changes: adds the frame. Returns: data, the frame as read back from SolidWorks. No edge at the attach point is not_found.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add_gtol"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataNoThe frame. `characteristic` (position, flatness, perpendicularity, parallelism, profile_surface or concentricity) and `tolerance` are required, plus either the dimension or the sheet position; `diameter_zone`, `material_condition` (none, mmc, lmc) and up to three `datums` (primary first) have defaults.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the safety profile is covered; the description adds real context on top: the prerequisite of an open active drawing, that it mutates by adding a frame, and a specific failure mode ("No edge at the attach point is `not_found`"). It does not discuss idempotency or what happens when a referenced dimension is missing, so a 5 is not warranted.

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 primary action is front-loaded in the first sentence with an example, then the two placement modes follow, and a compact Needs/Changes/Returns block closes it out. Every sentence carries distinct information with no redundancy.

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?

Given an output schema exists, the return-value sentence is a bonus rather than a necessity. Combined with prerequisite disclosure, the two placement modes, the datum cross-reference, and the not_found error case, an agent has everything needed to invoke this correctly.

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 100%, so the baseline would be 3, but the description adds binding semantics the schema does not enforce: it explains that the frame sits under the attached dimension's text, that x_mm/y_mm are ignored in that mode, and that a leader requires both attach_x_mm and attach_y_mm. It also restates the either/or requirement (dimension or sheet position) that the schema leaves unenforced via its permissive anyOf.

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 description opens with a specific verb and resource: "Add a GD&T feature control frame to the active drawing," and immediately supplies a concrete example ("position Ø0.2 (M) to A|B|C"). It clearly separates this tool from siblings like add_annotation and add_note by naming the GD&T frame as the artifact and pointing to add_datum_tag as a companion.

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?

It gives two explicit usage modes: attach to an existing dimension via dimension_view + dimension_name, or place freely at x_mm/y_mm with an optional leader. It also states the precondition (an open, active drawing) and directs the agent to add_datum_tag for referenced datums. It lacks an explicit when-not clause (e.g., when to prefer add_annotation or add_note), so it falls just short of a 5.

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