Skip to main content
Glama
SolidworksMCP-python

SolidworksMCP-python

Add Sketch Line

add_line

Draws a straight line between two points in an open sketch to create straight-edge profiles, using millimeter coordinates and optional construction geometry.

Instructions

Draw a straight line between two points in the open sketch, in mm.

Use it for profiles made of straight edges; for a closed box, use add_rectangle, and for a revolve axis, add_centerline. Needs: an open sketch (create_sketch). Changes: adds a line (a construction line with construction). Returns: line with id, start, end and length. Its id is what add_sketch_constraint and add_sketch_dimension take.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe line. Give `x1`, `y1`, `x2`, `y2` (mm; or `start_x`, `start_y`, `end_x`, `end_y`); `construction` is off.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.0
    • changedInput schema / properties / input_data / description
      Previous value: -"The input data value."New value: +"The line. Give `x1`, `y1`, `x2`, `y2` (mm; or `start_x`,\n`start_y`, `end_x`, `end_y`); `construction` is off."
  2. First observedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, so the safety profile is covered. The description adds real context beyond that: what gets added, the construction-line variant, and the returned object's fields. It does not address duplicate-line behavior despite idempotentHint=false, which keeps it from a 5.

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 core action, then compact labeled clauses (Use it for / Needs / Changes / Returns) that each carry distinct information with no 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?

Covers prerequisite, mutation effect, return shape, and downstream usage of the returned id, which is everything an agent needs to chain this tool correctly. The output schema exists but the description's summary of the return is still accurate and useful.

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 still adds value by stating units (mm), noting the start_x/start_y/end_x/end_y aliases, and explaining that construction produces a construction line rather than normal geometry.

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 ('Draw a straight line between two points in the open sketch') with units, and explicitly distinguishes itself from add_rectangle and add_centerline by naming the cases those cover.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use guidance ('profiles made of straight edges'), names the alternatives for other cases, and states the prerequisite ('Needs: an open sketch (create_sketch)').

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