Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Set Custom Property

set_custom_property
DestructiveIdempotent

Create or overwrite a text custom property on the active SolidWorks document so title blocks and BOMs read the correct PartNo, Description, or DrawnBy value.

Instructions

Create or overwrite one text custom property on the active document, e.g. PartNo or DrawnBy.

Use it to fill what a title block or BOM reads. The value is read back, so success means it was stored. Needs: an open, active document. Changes: writes the property, replacing one of the same name (save the file to keep it). Returns: data with name, value, resolved and configuration.

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_custom_property"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe property. `name` and `value` (text, or a link such as $PRP:"SW-Mass") are required; `configuration` defaults to file-level.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description goes further: it explains exactly what is destroyed ('replacing one of the same name'), that persistence requires a save ('save the file to keep it'), and that the value is read back so success is verifiable. That is real behavioral context rather than a restatement of the hints.

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, then cleanly delimited Needs/Changes/Returns lines; every sentence carries information an agent needs and nothing is repeated.

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?

With annotations, a full input schema, and an output schema all present, the description covers prerequisites, destructive effect, and persistence. It could say more about failure modes (e.g. an unresolvable link) or why a caller would pick a specific configuration, but the essentials for a correct call are there.

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

Parameters3/5

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

Schema description coverage is 100% and the nested input_data object already documents name, value, the $PRP: link form, and the configuration default. The description adds only the text-only constraint and duplicate examples, so baseline 3 applies.

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 pair and resource ('Create or overwrite one text custom property') and scopes it to the active document, with concrete examples (PartNo, DrawnBy). The scope word 'one' and the 'text' qualifier immediately separate it from a bulk read of properties.

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 a concrete use case ('fill what a title block or BOM reads') and a prerequisite ('an open, active document'), which is enough to know when to call it. It stops short of naming the read counterpart (get_custom_properties) or stating when not to use it.

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