Sketch a line
onshape_sketch_lineAdds a sketch containing a single line segment defined by start and end points on a selected plane or face. Use it to create open profile geometry that cannot be extruded until closed.
Instructions
Add a sketch holding one line segment. A line alone encloses no region, so it cannot be extruded.
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": {
"doc": "<doc>",
"ws": "<ws>",
"elem": "<elem>",
"start": "<start>",
"end": "<end>"
},
"name": "onshape_sketch_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ws | Yes | Workspace id — the <ws> segment of the document URL. | |
| doc | Yes | Document id — the <doc> in cad.onshape.com/documents/<doc>/w/<ws>/e/<elem>. | |
| end | Yes | End point. As [x, y] inches or "x,y". | |
| elem | Yes | Element id (tab) — the <elem> segment of the document URL. | |
| name | No | Feature name shown in the tree (default "Sketch"). | |
| plane | No | Default plane to sketch on (default Front). | |
| start | Yes | Start point. As [x, y] inches or "x,y". | |
| validate | No | Re-read the feature list afterwards and fail if the feature regenerated with an error (default true). | |
| plane_feature | No | Sketch on a face created by this feature id instead of a default plane. |