Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Trim Sketch Entity

sketch_trim
Destructive

Trims away a sketch entity segment at a specified point back to its intersection with other geometry, cleaning overlapping shapes into a single profile.

Instructions

Trim away the piece of a sketch entity at a point, back to where it meets others.

Use it to clean up overlapping shapes into one profile, such as the arc inside a keyhole. point ([x, y] sketch mm) is on the piece to remove; an entity that meets nothing is removed whole. Needs: an open sketch with an entity at the point. Changes: removes that piece. Returns: trim with the point and the sketch's segments_before and segments_after. A trimmed entity's id may no longer name a whole segment. Nothing at the point fails as invalid_input.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYes`point`, `[x, y]` in sketch mm.

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?

Beyond the destructiveHint and non-idempotent annotations, the description discloses the exact side effect (the piece at the point is removed, and an entity meeting nothing is removed whole), the precondition of an open sketch, and the consequence that a trimmed entity's id may no longer name a whole segment. It even names the error contract ('invalid_input') for a miss, which is behavior an agent cannot get from the annotations.

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 core action is front-loaded in the first clause and every sentence carries information: scenario, parameter meaning, precondition, effect, return, caveat, error. It is dense and slightly telegraphic in the trailing sentences, but there is no filler to cut.

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 destructive single-parameter geometry edit, the description covers preconditions, what is destroyed, the edge case of an isolated entity, the id invalidation caveat, and the error result, so nothing an agent needs to call it safely is missing. The return-value sentence is somewhat redundant given an output schema exists, but it does no harm.

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 coverage is 100% and the schema already explains that `point` is `[x, y]` in sketch mm used for trim or extend, so the baseline is 3. The description reinforces the trim-specific meaning ('on the piece to remove') but adds no unit, format, or tolerance detail beyond the structured field.

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 gives a precise verb-plus-resource ('Trim away the piece of a sketch entity at a point') and states the mechanism ('back to where it meets others'), which is exactly what separates a trim from a fillet, extend, or offset on the same sketch. An agent reading only this sentence knows what operation will be performed and on what geometry.

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 supplies a concrete usage scenario ('clean up overlapping shapes into one profile, such as the arc inside a keyhole') and a precondition ('Needs: an open sketch with an entity at the point'), plus the failure mode when nothing is at the point. It stops short of naming an alternative such as sketch_extend for the opposite operation, so it is clear context without explicit when-not guidance.

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