Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Set Sketch Text

set_sketch_text
Idempotent

Rewrite sketch text and rebuild the model so debossed lettering updates after dimension or equation changes; pass the same $PRP link or new text.

Instructions

Rewrite the text in a sketch and rebuild, so debossed lettering shows it.

Use it after a change the text should follow: SolidWorks doesn't redraw sketch text on rebuild, not even a $PRP: link to a dimension an equation changed. Give the same $PRP:"name" text to re-read the link, or new text. The sketch is opened, its text rewritten, closed, and the model rebuilt, so a cut made from it changes too. Needs: a part with that sketch, holding text from add_sketch_text. Changes: the sketch's text. Returns: the sketch, each text before and after (links resolved).

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": "set_sketch_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYes`sketch_name` and `text`, both required.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false; the description adds the important causal chain that the sketch is opened, text rewritten, closed and the model rebuilt, so a cut made from that sketch changes too. That is real value beyond the annotations. However, it does not say whether the rebuild can fail or what happens to downstream features when text length changes, and the cascading geometry change sits in mild tension with destructiveHint=false even if it does not contradict it.

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?

Front-loaded with the action and its purpose, then the trigger, then the mechanism, needs, changes and returns in a compact labeled tail. The parentheses around `$PRP:"name"` and the resolved-link note are dense but each carries information an agent needs; nothing is filler.

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 nested-parameter mutation tool with an output schema, the description covers prerequisites (a part with that sketch containing text from `add_sketch_text`), side effects, and the return shape. An agent has enough to call it correctly and predict what changes.

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; the description earns above baseline by explaining the non-obvious semantics of `text` — passing the identical `$PRP:"name"` string is how you force a link to be re-read, while any other string is a replacement. It also states that `before`/`after` come back with links resolved, which clarifies what the parameters produce.

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 ("Rewrite the text in a sketch and rebuild") plus the observable outcome ("so debossed lettering shows it"). It also positions itself against the sibling that creates the text ("holding text from `add_sketch_text`"), so an agent can separate creation from update without opening either 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?

Gives an explicit trigger: use it after a change the text should follow, with the concrete reason that SolidWorks does not redraw sketch text on rebuild, even for `$PRP:` links. It also tells the caller to pass the same `$PRP:"name"` text to re-read a link versus new text to overwrite. Missing only an explicit "do not use when" statement or a named alternative for the first-write case beyond the `add_sketch_text` prerequisite.

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