Skip to main content
Glama
dsh18235538266-crypto

onshape-mcp-codex

create_sketch_rectangle

Creates a rectangular sketch on a specified plane or face using two corner points, with optional variable dimensions.

Instructions

Create a rectangular sketch in a Part Studio. Sketch location: pass either plane (standard datum: Front/Top/Right) or faceId (deterministic ID of a face from list_entities). Pass faceId to sketch on an existing part face; if both are given, faceId wins and a warning is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoSketch nameSketch
planeNoStandard datum plane. Defaults to Front if neither plane nor faceId is given.
faceIdNoDeterministic ID of an existing face to sketch on (get from `list_entities`). Mutually exclusive with `plane`; wins if both given.
corner1YesFirst corner [x, y]. Bare numbers are mm; use strings like "10 mm" or "0.5 in" for explicit units.
corner2YesOpposite corner [x, y]. Same convention as corner1.
elementIdYesPart Studio element ID
documentIdYesDocument ID
workspaceIdYesWorkspace ID
variableWidthNoOptional variable name for width
variableHeightNoOptional variable name for height

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior3/5

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

The description discloses the precedence behavior and warning, but does not clarify whether the rectangle is added to an existing sketch or creates a new sketch, nor what happens with the optional variable names. Since there are no annotations, more behavioral detail would be expected, but the core behavior is partially addressed.

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?

The description is concise, using only a few sentences to convey the purpose and location options. It is well-structured with clear separation between purpose and usage guidance, with no unnecessary verbosity.

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?

The description covers the key aspects needed to invoke the tool, including location and precedence. However, it does not mention what happens after creation (e.g., whether a new sketch entity is produced or appended to an existing one) or the effect of variableWidth/variableHeight. These are minor gaps given the schema already documents parameter meanings.

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

Parameters5/5

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

Every parameter is described in the schema, and the description enhances understanding with details like unit conventions for corner coordinates and the mutual exclusivity of plane and faceId. The descriptions are precise and cover all inputs.

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 clearly states the tool creates a rectangular sketch in a Part Studio, and distinguishes it from sibling tools for circles, lines, and rounded rectangles. The purpose is unambiguous and action-oriented.

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?

The description explicitly explains the two location options (plane and faceId), when to prefer faceId, and the precedence rule if both are provided. This gives clear guidance on how to choose between them, fulfilling the usage guidance requirement.

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