Skip to main content
Glama
dsh18235538266-crypto

onshape-mcp-codex

create_rounded_rectangle_sketch

Create a rounded rectangle sketch in one feature from two opposite corners, a corner radius, and a plane or face. Avoids drawing four lines and four tangent arcs manually, reducing geometry errors.

Instructions

Create a rounded rectangle sketch (4 lines + 4 tangent corner arcs) in ONE feature. Use instead of hand-rolling 4 lines + 4 arcs with the per-primitive tools -- fewer turns and no radians/degrees mistakes. Sketch location: pass either plane (Front/Top/Right) or faceId (from list_entities). faceId wins when both are given. cornerRadius must be > 0 and no more than half the short side of the bounding rect (otherwise there'd be no straight segments left).

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 (from `list_entities`). Mutually exclusive with `plane`; wins if both given.
corner1YesFirst corner of the bounding rect [x, y]. Bare numbers are mm; use "10 mm" / "0.5 in" for explicit units.
corner2YesOpposite corner of the bounding rect [x, y]. Same convention as corner1.
elementIdYesPart Studio element ID
documentIdYesDocument ID
workspaceIdYesWorkspace ID
cornerRadiusYesFillet radius at each corner. Bare numbers are mm; use explicit units for in/cm/m.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden, and it discloses composite geometry, faceId precedence, and a precise cornerRadius bound. It does not describe return values or failure modes, but the behavioral detail it provides is meaningful and not just schema repetition.

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?

Three purposeful sentences: what/why, where, and constraint. The key scoping claim is front-loaded and no sentence is filler.

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 plus rich schema is enough to select and invoke the tool correctly for a 9-param creation tool. It lacks output/return details and failure behavior, but no output schema exists and the schema covers parameter semantics.

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% and already documents params, so baseline is 3. The description adds value beyond schema by defining corner1/corner2 as opposite corners of the bounding rect and adding the 'no more than half the short side' constraint on cornerRadius, which is not in the schema.

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?

Description states a specific action and resource: 'Create a rounded rectangle sketch (4 lines + 4 tangent corner arcs) in ONE feature.' It also differentiates itself from per-primitive tools, so an agent can distinguish it from create_sketch_line/create_sketch_arc/create_sketch_rectangle without opening schemas.

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?

Explicitly says when to use it: instead of hand-rolling 4 lines + 4 arcs with per-primitive tools, citing benefits (fewer turns, no radians/degrees mistakes). Also gives location selection guidance and precedence: pass plane or faceId, and faceId wins if both are given.

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