Skip to main content
Glama
onshape-jamcp

onshape-jamcp

Create sketch

create_sketch

Draws 2D rectangles, circles, lines, arcs, polygons, and hexagons on an Onshape plane or planar face and returns a feature ID for extrusion.

Instructions

Create a sketch of 2D shapes on a plane or planar face. Point coordinates are [x, y] in the sketch's own axes, in the configured length unit (mm by default). Returns the sketch's feature_id, to pass to extrude. Tip: verify placement afterwards with get_part_properties or a screenshot.

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": {
      "document_id": "<document_id>",
      "element_id": "<element_id>",
      "shapes": "<shapes>"
    },
    "name": "create_sketch"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoSketch
planeNo'Top' (XY plane), 'Front' (XZ plane) or 'Right' (YZ plane) of the origin, or the ID of a planar face / plane from get_body_details to sketch on an existing face.Top
shapesYes2D shapes to draw: rectangle, circle, hexagon, line, arc or polygon. Closed shapes become regions that `extrude` can turn into solids. Sizes (diameter, radius, width, height, across_flats) may be variables such as '#shank_diameter': the sketch then follows the variable.
element_idYesElement (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document.
document_idYesOnshape document ID: the 24-character hex string after /documents/ in the document URL. Get it from list_documents.
workspace_idNoWorkspace ID (the string after /w/ in the URL). Optional - defaults to the document's main workspace.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent, open-world write, so the safety bar is covered. The description adds genuinely new behavioral detail: coordinate units and default (mm), that coordinates live in the sketch's own axes, and that a feature_id is returned for chaining. It does not mention what happens on a failed plane ID or that repeated calls stack additional features.

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?

Four tight sentences with zero filler, and the core action plus return value are front-loaded. The verification tip is useful but sits at the same weight as the contract itself; a small trim would make it a 5.

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 six-parameter write tool with an output schema and full annotations, the description covers the essentials an agent needs: units, axes, downstream chaining, and result verification. Missing edge-case behavior (invalid plane, accumulative features, limits on shape count) keeps it from being fully complete.

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 already 83%, so the baseline is 3; the description earns an extra point by front-loading the coordinate convention ('[x, y] in the sketch's own axes') and the default unit, which an agent needs before constructing shapes. It still adds nothing about plane selection names or variable references, which remain schema-only.

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 ('Create a sketch of 2D shapes') plus the placement scope ('on a plane or planar face'). The mention of `extrude` as the downstream consumer makes the tool's role in the modeling chain unmistakable relative to siblings like add_feature or extrude.

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 clear workflow guidance: use this first, feed the returned feature_id to `extrude`, then verify placement with get_part_properties or capture_screenshot. It stops short of stating when NOT to use it (e.g., when geometry already exists, use features like fillet/boolean instead), so it is strong context without explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.