Skip to main content
Glama
onshape-jamcp

onshape-jamcp

Linear pattern

linear_pattern

Repeat parts, features, or faces in a straight line or two-direction grid to create rows of holes, ribs, or legs, with set counts and spacing.

Instructions

Repeat parts, features or faces in a straight line (a row of holes, ribs, legs); add a second direction for a grid. distance is the spacing between neighbouring instances. Pattern the FEATURE that makes one hole or rib (feature_ids) so the copies cut or merge as it does. The default name shows count and spacing ('Linear pattern x4 @ 20 mm'). The reply says what changed (parts, volume).

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>",
      "count": "<count>",
      "distance": "<distance>",
      "direction": "<direction>"
    },
    "name": "linear_pattern"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
countYesNumber of instances INCLUDING the original (2 or more), or an Onshape expression such as '#spokes' so a variable or configuration can drive it.
verifyNoMeasure the Part Studio before and after (two extra requests) and report what changed: part count and total volume, plus a warning when nothing changed (Onshape can accept a feature that does nothing). Set false to save requests.
count_2NoSecond direction (a grid): number of rows. Needs direction_2 and distance_2 too.
distanceYesLength: a number in the configured unit (see get_settings; mm by default), a string with a unit such as '2.5 in', or an Onshape expression such as '#width'.
face_idsNoRepeat these faces (IDs from get_body_details). Give exactly one of part_ids, feature_ids and face_ids.
part_idsNoRepeat these whole parts (IDs from list_parts). Give exactly one of part_ids, feature_ids and face_ids.
directionYesDirection of the row: 'x', 'y' or 'z' (the world axes), the ID of a straight edge, planar face or cylindrical face (from get_body_details; a face gives its normal), or 'sketch:<feature_id>' for the construction line of a sketch.
operationNoOnly for part_ids: 'new' makes each copy a separate part (default); 'add' merges the copies into existing parts; 'remove' cuts with them; 'intersect' keeps the overlap.new
distance_2NoSecond direction: spacing between rows.
element_idYesElement (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document.
merge_withNoPart IDs the copies merge with when operation is 'add', 'remove' or 'intersect' (default: every part they touch).
direction_2NoSecond direction, same forms as `direction`.
document_idYesOnshape document ID: the 24-character hex string after /documents/ in the document URL. Get it from list_documents.
feature_idsNoRepeat these features (feature_id of an extrude or other feature, e.g. one spoke of a wheel); each copy merges the way the feature does. Give exactly one of part_ids, feature_ids and face_ids.
workspace_idNoWorkspace ID (the string after /w/ in the URL). Optional - defaults to the document's main workspace.
opposite_directionNoGo the other way.
opposite_direction_2NoSecond direction: go the other way.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already disclose that this is a non-read-only, open-world, non-idempotent operation, so the description does not need to restate those safety traits. It adds useful behavior beyond annotations: the default naming convention, the reply contents, and the fact that patterning a feature makes copies cut or merge as the source feature does.

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 front-loaded with purpose, then adds key semantic notes about distance, feature patterning, default naming, and reply behavior. Every sentence contributes useful information without redundant restatement.

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 an 18-parameter mutation tool with a high-coverage schema, annotations, and an output schema, the description provides enough high-level context and key semantics for correct selection and invocation. It does not fully explain all optional parameter interactions or alternatives, but the rich schema and output schema carry the remaining detail.

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 very high, so the schema already carries most parameter documentation. The description still adds meaning by clarifying that distance is spacing between neighboring instances and by advising that feature_ids should target the feature that creates one hole or rib, which goes beyond the schema's mechanical parameter descriptions.

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 states a specific verb and resource: repeat parts, features, or faces in a straight line, with an optional second direction for a grid. The straight-line/grid scope clearly distinguishes it from circular or mirror operations.

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

Usage Guidelines3/5

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

It gives clear usage context through examples such as rows of holes, ribs, and legs, and explains when a second direction applies. However, it does not explicitly name alternatives such as circular_pattern or mirror, nor state when not to use this tool.

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