Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Add Sketch Text

add_sketch_text

Adds text to an open sketch at a start point or centered on a model point so you can emboss or deboss lettering, then extrude or cut it.

Instructions

Write text in the open sketch, at a point or centred on one, to deboss or emboss it.

Use it for lettering, then cut (create_cut_extrude) or extrude the sketch. center_at (a model point in mm) puts the text's middle there; otherwise it starts at x, y. $PRP:"name" in the text shows a custom property; one holding a dimension's name ("D1@Sketch3", set with set_custom_property) makes the text follow that dimension. To read from a face's own side, such as an underside, open the sketch on that face (create_sketch face_point). Needs: an open sketch (create_sketch). Changes: adds text. Returns: the text's id, the text as SolidWorks shows it (links resolved) and its height.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input_data": "<input_data>"
    },
    "name": "add_sketch_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe text. `text` is required; `x`, `y` (mm), `height` (3.5 mm) and `center_at` have defaults.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare non-read-only, non-idempotent, non-destructive, and the description adds real context beyond them: the required open-sketch precondition, 'Changes: adds text', the returned fields, and the non-obvious fact that `$PRP:"name"` links resolve and can make text follow a dimension. It does not discuss what happens on repeated calls or text-overlap, but the core behavioral profile is well covered.

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 prose is dense but front-loaded with the action, then organized under explicit 'Needs/Changes/Returns' labels, so an agent can scan it. The `$PRP` and face-side sentences are the only mildly sprawling part and are justified by non-obvious behavior.

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?

For a single-object-parameter mutation with an output schema, the description covers preconditions, side effect, parameter precedence, and link resolution — enough to call it correctly. The main residual gap is how it relates to the sibling text tool (`set_sketch_text`), which the agent must infer.

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 is 3, but the description adds a relational rule the schema does not state: `center_at` places the text's middle at a model point, 'otherwise it starts at `x`, `y`' — an explicit precedence between parameters. The `$PRP` and face-side notes reinforce but largely echo the 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 specific verb and resource: 'Write text in the open sketch, at a point or centred on one, to deboss or emboss it', and adds the downstream purpose (cut or extrude). It does not differentiate itself from the sibling `set_sketch_text`, so an agent has to infer the split from names alone.

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 a clear workflow context ('Use it for lettering, then cut (`create_cut_extrude`) or extrude the sketch') and states the prerequisite 'Needs: an open sketch (`create_sketch`)'. There is no explicit when-not clause or named alternative for modifying existing text, which keeps it 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