For agents
Design in the cloud
Build a product part by part in your person's account with short modeling scripts and circuit boards. Summonmade runs, checks and draws each part, every open designer follows, and the design becomes orders.
An AI app without tools on your person's computer can still design a product. ChatGPT and Claude are examples. You build the product in your person's Summonmade account, one part at a time. Each part is a short script. Summonmade runs the script, checks the part and draws a picture of it. The designer in the chat and the design page on summonmade.com show each change at once. When the design is ready, you order its parts.
A design is one product, for example a stainless-steel mug, a lamp shade, a phone stand or a desk clock. A design has parts. Each part is made by one process from one material, such as a 3D-printed handle in nylon, a bent steel sheet or a circuit board with its parts soldered on.
The flow
Call
create_designwith a short title, thenopen_designerwith thedesign_id. Your person sees the empty design in the chat and watches the design grow.Call
set_partonce for each part, with the process, material and script. Read the checks and look at the picture in the result. Fix what fails or looks wrong with anotherset_part. For a circuit board, callset_boardwith tscircuit code or a KiCad project, then fix the findings withedit_board. See Circuit boards.Place each part in the product with
positionandrotation. Parts must not overlap. Sides that slide into each other need a gap.When every check passes, write the assembly guide with
set_guide.When your person wants the product made, call
order_designwith the delivery country. You get one quoted order for each part. Show your person the prices fromget_order. When they agree,pay_ordergives the payment page of each order.
A short request such as "design me a phone stand" is enough to start. Choose sizes, materials and processes that suit the product, and tell your person at the end what you chose. Ask first only when your person wants to decide.
Your person can change the design in the designer between your calls. Read the design again with get_design before you rely on what you read earlier.
Tools
The tools are part of the MCP server. Reading needs the scope orders:read, every change orders:write. An API key has both.
| Tool | What it does |
|---|---|
list_designs |
Lists the designs of the account, the last changed first. |
create_design |
Starts an empty design with a title and an optional description. |
get_design |
Reads a design: the parts with their scripts, sizes and places, the checks, the guide, the orders and the latest activity. The result has a picture of the assembled product. |
set_part |
Makes a part, or changes one. Runs the part's script, checks the part and the product, and returns the checks and the pictures. |
remove_part |
Removes a part. |
undo_change |
Takes back the last change of the design. The design keeps the last 60 changes. |
redo_change |
Makes the last undone change again. |
set_guide |
Writes the assembly guide in Markdown, with one ## heading per step. |
set_board |
Makes the circuit board of a part from tscircuit code or a KiCad project, or changes the board's options and place. Returns the numbered findings, the look image of the board and a picture of the product. |
edit_board |
Moves and turns parts on a board, adds traces from pad to pad, routes the board with the autorouter, removes traces and changes the options. |
check_board |
Lists every finding of a board's checks against the factory limits, with its number, rule and place. |
look_board |
Shows the board from the top with a numbered square at each finding. |
order_design |
Makes one order for each part and sends each order to the quote. |
open_designer |
Shows the design in the chat. Without design_id, the designer shows the designs of your person to choose from. |
Call open_designer once for each design. An open designer follows every change without more calls, and each call opens another designer.
Parts
set_part takes the design_id, the part_id and the fields of the part. A new part needs process, material and code. For a part that exists, send only the fields that change. Without code, the part keeps its shape and its script does not run again.
| Field | Values |
|---|---|
part_id |
1 to 40 lowercase letters, digits and hyphens, for example body or handle. It does not change. |
name |
What people call the part, for example "Handle". Without it, the part ID. |
process |
3d-print, cnc or sheet-metal. For a circuit board (pcb or pcb-assembly), use set_board; see Circuit boards. |
material |
A material of the process, for example PLA (FDM), Aluminium 6061 or Stainless steel 304, 1.5 mm. get_catalog lists the materials that get a price at once. |
finish |
A finish of the process, for example Anodized. Empty for the standard finish. |
quantity |
Pieces in one product, 1 to 1000. Without it, 1. |
color |
A display color such as #3b3d41. Empty for the color of the material. |
position |
[x, y, z] in millimeters: where the part sits in the product. |
rotation |
[x, y, z] in degrees: the part turns about x first, then y, then z, before the part moves into position. |
code |
The script that makes the part, with the modeling API. |
label |
A few words for the history, for example "Add a handle". |
Each part has separate coordinates. Model a part where that is easy, for example standing on z = 0 and centered on the z axis. Then place the part with position and rotation.
A script that fails changes nothing. The tool answers with an error that names the line and the call, for example Line 3: cylinder(): height must be more than 0; it is -2. Correct the script and send it again.
The modeling API
A script is the body of a function. A script builds one part and returns the part as a solid. Units are millimeters and degrees. Z points up. Each call checks the arguments and names the call in an error.
Solids
| Call | What it makes |
|---|---|
box(x, y, z, {center}) |
A block from the origin to (x, y, z). With center: true, it is centered on the origin. |
roundedBox(x, y, z, radius) |
A block with rounded edges and corners, centered in x and y, standing on z = 0. The radius is at most half the smallest side. |
cylinder(height, radius, {top, segments, center}) |
A cylinder on z = 0. top is the top radius, for a cone. center: true centers it in z. |
sphere(radius, {segments}) |
A sphere on the origin. |
torus(majorRadius, minorRadius, {segments}) |
A ring around the z axis, in the x-y plane, centered on the origin. |
Profiles
A profile is a flat shape in x and y. Make it a solid with extrude or revolve.
| Call | What it does |
|---|---|
rect(x, y, {center, radius}) |
A rectangle from the origin, or centered. radius rounds the corners. |
circle(radius, {segments}) |
A circle on the origin. |
polygon([[x, y], ...]) |
An outline from 3 or more points, in either direction. |
profile.extrude(height, {twist, scaleTop, center}) |
A solid along z. twist turns the top by degrees. scaleTop scales the top: one number, or [x, y]. 0 makes a point. |
profile.revolve({degrees, segments}) |
A solid that turns the profile around its y axis, which becomes the z axis. x is the radius, so draw the profile at positive x. |
profile.offset(delta) |
Grows the outline, or shrinks it with a negative delta. The corners become round. |
profile.add(other), .subtract(other), .intersect(other) |
Combines two profiles. |
profile.translate(x, y), .rotate(degrees), .mirror("x" or "y"), .scale(s) or .scale(x, y) |
Moves, turns, mirrors or scales the profile. |
profile.area(), profile.bounds() |
The area in mm², and {min: [x, y], max: [x, y]}. |
Sheet metal
sheet(points, thickness, {bendRadius, width}) makes a bent strip. The points are the bend line, as [x, z], along the middle of the sheet. The strip is width wide along y and centered on y = 0. bendRadius is the inside radius of each bend; without it, it is the thickness.
Make a sheet-metal part from one sheet() and cut the holes and notches with subtract. Then Summonmade can unfold the part: the order gets the DXF of the flat blank, and the quote comes at once. Use the thickness of the material: Stainless steel 304, 1.5 mm takes sheet(points, 1.5, …).
Operations on solids
Each operation returns a new solid and keeps the old one.
| Call | What it does |
|---|---|
a.add(b), a.subtract(b), a.intersect(b) |
Joins, cuts or keeps the common volume. |
union([a, b, ...]) |
Joins many solids at once. |
hull([a, b, ...]) |
The convex hull of solids, and of points [x, y, z]. |
a.translate(x, y, z) |
Moves. Also takes one array [x, y, z]. |
a.rotate(x, y, z) |
Turns about x first, then y, then z, in degrees. |
a.mirror("x", "y" or "z") |
Reflects across the plane through the origin. |
a.scale(s) or a.scale(x, y, z) |
Scales from the origin. |
a.size(), a.volume(), a.bounds() |
[x, y, z], mm³, and {min, max}. |
linear(solid, count, [dx, dy, dz]) |
count copies, each moved by the step from the one before. |
polar(solid, count, {degrees}) |
count copies turned about the z axis: evenly around a full turn, or from 0 to degrees when it is less than 360. |
console.log(...) |
Writes to the run's log, which the result shows. |
Rules and limits
- Return one solid, for example
return cup;. A profile is not a part. - A part is one body. Shapes that do not touch become separate bodies, and the check fails. Join them, or make each piece a separate part.
- A cut goes all the way through only when the cutting solid sticks out on both sides. Make it 1 mm longer at each end, or a thin skin stays.
- A script has no network, no clock and no random numbers.
- A part has at most 200,000 triangles, and every point is within 5 m of the origin. A script makes at most 20,000 calls and has a short time limit.
Examples
A mug of 3 mm stainless steel, with the handle in one piece:
const wall = 3, height = 95, radius = 41;
const cup = cylinder(height, radius).subtract(cylinder(height, radius - wall).translate(0, 0, 6));
const grip = torus(24, 5).rotate(90, 0, 0).translate(radius + 14, 0, height / 2);
return cup.add(grip.subtract(cylinder(height, radius - 1)));A lamp shade of PETG with twelve slots, and a ring at the top for the lamp holder:
const t = 1.6;
const wall = polygon([[70, 0], [70 + t, 0], [26 + t, 110], [26, 110]]).revolve({segments: 96});
const ring = rect(26 - 14, 3).translate(14, 107).revolve({segments: 96});
const slot = box(40, 3, 60, {center: true}).rotate(0, -22, 0).translate(52, 0, 45);
return wall.add(ring).subtract(polar(slot, 12));A phone stand of 1.5 mm steel sheet, with a notch in the front lip for the cable:
const stand = sheet([[0, 14], [0, 0], [100, 0], [58, 92]], 1.5, {width: 70, bendRadius: 2});
const notch = box(8, 18, 20, {center: true}).translate(0, 0, 14);
return stand.subtract(notch);A machined knob with grip flutes, a D-shaft hole and a mark on top:
const body = cylinder(18, 15, {top: 13.5});
const grips = polar(cylinder(20, 1.6, {segments: 16}).translate(15.2, 0, -1), 18);
const shaft = cylinder(13, 3.05).subtract(box(10, 10, 14).translate(1.55, -5, 0)).translate(0, 0, -1);
const mark = box(7, 1.2, 1.2, {center: true}).translate(8, 0, 18);
return body.subtract(grips).subtract(shaft).subtract(mark);The base of an enclosure with four screw bosses:
const w = 80, d = 60, h = 30, wall = 2.4;
let shell = roundedBox(w, d, h, 4).subtract(roundedBox(w - 2 * wall, d - 2 * wall, h, 2).translate(0, 0, wall));
const boss = cylinder(h - wall - 2, 3.5).subtract(cylinder(h, 1.25).translate(0, 0, 3)).translate(0, 0, wall - 0.01);
for (const [x, y] of [[-1, -1], [-1, 1], [1, -1], [1, 1]]) shell = shell.add(boss.translate(x * (w / 2 - 7), y * (d / 2 - 7), 0));
return shell;Its lid, a second part at position: [0, 0, 30], with a lip that fits into the opening with a gap of 0.4 mm:
const w = 80, d = 60, wall = 2.4, gap = 0.4;
const top = rect(w, d, {center: true, radius: 4}).extrude(2.4);
const ring = rect(w - 2 * wall - 2 * gap, d - 2 * wall - 2 * gap, {center: true, radius: 2 - gap})
.subtract(rect(w - 4 * wall, d - 4 * wall, {center: true, radius: 1}));
return top.add(ring.extrude(1.8).translate(0, 0, -1.8));Circuit boards
A circuit board is one part of the design, with the process pcb-assembly (the factory solders the parts on) or pcb (the bare board). The board comes from tscircuit code that you write, or from a KiCad project that your person gives you. Summonmade compiles the code, checks the board against the limits of the factory, makes the board in 3D in the product, and every open designer shows the board at once. The same checks run in the board editor of the designer, so you and your person see the same findings with the same numbers.
Make a board
set_board takes the design_id, the part_id and these fields:
| Field | Values |
|---|---|
code |
tscircuit code (TSX) in one file that exports the board. Code that does not compile changes nothing; the error names the line. |
kicad |
A KiCad project instead of code: {pcb, sch, pro}, the text of the .kicad_pcb file and, when your person has them, the .kicad_sch and .kicad_pro files. The schematic gives the nets and the part values. |
options |
The board options. See Board options. |
name, process, material, quantity, position, rotation, label |
As for other parts. The process is pcb-assembly for a board with parts and pcb for a board without parts, when you do not send one. The material is FR-4 when you do not send one. |
A new board needs code or kicad. Code or a KiCad project replaces the board and its edits. Without code and kicad, set_board changes only the options, the name, the quantity or the place of the board.
The board's own coordinates have the middle of the board at x 0, y 0 and the bottom side of the board at z 0. Place the board in the product with position and rotation, for example inside its enclosure. The fit checks treat the board and its parts as one solid: the board, and a block over the pads of each part.
tscircuit code
export default () => (
<board width="30mm" height="20mm" routingDisabled>
<pinheader name="J1" pinCount={2} footprint="pinrow2" pcbX={-11} pcbY={0} pcbRotation={90} />
<resistor name="R1" resistance="1k" footprint="0603" pcbX={0} pcbY={3} />
<led name="D1" color="red" footprint="0603" pcbX={6} pcbY={3} />
<capacitor name="C1" capacitance="100nF" footprint="0402" pcbX={0} pcbY={-4} />
<trace from=".J1 > .pin1" to="net.VCC" />
<trace from=".J1 > .pin2" to="net.GND" />
<trace from=".R1 > .pin1" to="net.VCC" />
<trace from=".R1 > .pin2" to=".D1 > .anode" />
<trace from=".D1 > .cathode" to="net.GND" />
<trace from=".C1 > .pin1" to="net.VCC" />
<trace from=".C1 > .pin2" to="net.GND" />
</board>
)- Elements:
resistor,capacitor,inductor,led,diode,chip(withpinLabels),pinheader,pushbutton,crystal,fuse,mosfet,transistor,holeandvia. - Each part has a
name, such asR1, and a footprint string, such as0402,0603,0805,soic8,sot23,qfn16,tssop20,dip8orpinrow4. pcbXandpcbYplace a part in millimeters from the middle of the board, y up.pcbRotationturns the part in degrees.<trace from=".R1 > .pin2" to=".D1 > .anode" />connects two pins.to="net.GND"connects a pin to a net.- Function components, arrays and
mapwork. You can importreactandtscircuit(forsel), and nothing else. - With
routingDisabled, the board has no copper traces yet: route the board withedit_board. WithoutroutingDisabled, the compiler routes each trace. - Not available yet: parts that the compiler gets from a parts catalog on the internet (for example
connectorwithstandard="usb_c", or a manufacturer part number), copper pours, and other imports.
Board options
Each option must be an option of the factory profile for the board. A value that the factory does not make changes nothing, and the error names the rule of the profile.
| Option | Values |
|---|---|
maskColor |
green (standard), purple, red, yellow, blue, white or black. |
silkscreen |
white or black. A new mask color without a silkscreen color takes the color that shows on the mask: black on white, else white. |
finish |
hasl-lead-free (standard), hasl, enig or osp. A board with 6 or more layers, or of 0.4 mm, takes only enig or osp; a board with one layer takes no osp. |
thickness |
0.4, 0.6, 0.8, 1.0, 1.2, 1.6 (standard) or 2.0 mm. The factory assembles boards of 0.8 to 1.6 mm. |
copperOz |
1 (standard), 2, 2.5, 3.5 or 4.5 oz on the outer layers of a board with one or two layers; 1 or 2 oz on a board with more layers. |
Edit a board
edit_board takes the design_id, the part_id, a list of edits, optional options and an optional label. The edits run in order and make one step of the history: undo_change takes the call back. Coordinates are millimeters from the middle of the board, y up. A pad is the part and the pin, such as R1.2, J1.pin1 or D1.anode.
| Edit | What it does |
|---|---|
{"op": "move", "ref": "D1", "x": 8, "y": 3} |
Moves the middle of a part to x, y. The traces of the part stay and open; route the board again. |
{"op": "rotate", "ref": "D1", "rotation": 90} |
Turns a part to the rotation in degrees, counterclockwise. |
{"op": "connect", "from": "R1.2", "to": "D1.anode", "layer": "top", "width": 0.25, "corners": [[4, 5]]} |
Adds a trace from pad to pad, with optional corners. Without width, the trace has the width that the autorouter uses. |
{"op": "route"} |
Routes every open connection with the autorouter, with a margin above the limits of the factory. |
{"op": "unroute", "net": "GND"} |
Removes the traces and vias of a net. Without net, it removes every trace and via. |
An edit that cannot be made changes nothing: the error says why, for example The board has no part Q7. Edits change the board, not the code. When you send the code again with set_board, the board comes from the code without the edits.
Findings
After each change, Summonmade checks the board against the factory profile. Each finding has a number n, a severity (error, warning or note), the kind of check (rule), the rule of the factory profile behind the check (profileRule, for example pcb.track.width or pcb.silk.height), a message and its place at in millimeters on the board. An error blocks the order.
| Rule | What it checks |
|---|---|
connectivity |
Every connection of the nets has copper. |
clearance |
Pads, traces and vias of different nets keep their distance. |
trace_width, drill, via, annular_ring, hole_spacing |
Traces, drills, vias, rings and holes against the limits of the factory. |
copper_edge |
Copper keeps its distance from the board edge. |
silkscreen |
Silkscreen lines and text that the factory can print. |
board_size |
The board is not smaller or larger than the factory makes. |
placement, netlist |
Parts on the board, pins and nets from the code or the schematic. |
check_board lists every finding. look_board shows the board from the top: copper of the top layer in copper-orange, of the bottom layer in blue, pads, drills, silkscreen and the board edge, thin lines for connections without copper, a numbered square at each finding and the list of findings. The numbers are the same in the board view of the designer. look_board takes theme: "dark" for a dark page.
Checks
Summonmade checks each part and the assembled product after every change. Each check is pass, warn or fail. A fail blocks the order. A warn is worth a look.
| Check | What it looks at |
|---|---|
mesh.closed |
The part is one closed body. Separate bodies fail. |
model.cavity |
Closed spaces inside the part, with no opening to the outside. FDM prints them hollow. Other printers leave loose powder or liquid resin inside, so the check asks for two escape holes of 2.5 mm or more from each space. CNC and sheet metal cannot make a closed space, so it fails. |
model.size |
The part fits the process: the build volume of the 3D-printing material, 950 × 560 × 120 mm for CNC, a flat blank of 800 × 800 mm for sheet metal. |
model.wall |
The thinnest walls, measured at points all over the part. For 3D printing, FDM needs 0.7 mm and makes 1.2 mm well; resin needs 0.5 mm and makes 0.8 mm well; nylon needs 0.6 mm and makes 1 mm well; metal printing needs 0.9 mm and makes 1.5 mm well. CNC needs 0.3 mm and makes 0.5 mm well in metal; in POM it needs 0.6 mm and makes 1 mm well. |
material.catalog |
The material and the finish get a price at once. Another material gets a price from a person at Summonmade within one working day. |
sheet.flat |
A sheet-metal part unfolds into a flat blank. Its thickness must be the thickness of the material, and a bend radius smaller than the thickness gets a warning. |
fit.collision |
No two parts overlap where they are placed. |
fit.gap |
Where the sides of two parts touch, they keep the gap of a fit: 0.5 mm for FDM, 0.2 mm for resin and nylon, 0.5 mm for metal printing, 0.1 mm for CNC and 0.5 mm for sheet metal. Parts that rest on each other, and parts that are glued or screwed together, can touch. |
board.options |
The board options are options of the factory profile for the board. |
board.assembly |
The process suits the board: assembly of a board with parts, in the size that the factory assembles. |
board.<rule> |
One check for each rule with findings on the board, such as board.connectivity or board.silkscreen. A rule with an error fails. board.rules passes when the board has no errors and no warnings. |
order.ready |
The design can be ordered, and which parts get their price from a person. |
Pictures
set_part and get_design return pictures as images, so that you see what you built in any client. A picture is 640 × 640 pixels, in the isometric view of the Summonmade drawings: +x runs to the lower right, +y to the upper right and +z up. The camera looks from the front right, from +x and -y, and from above. Top faces are the lightest, front faces take the middle tone and right faces the darkest, in the colors of the materials.
After a change of a part, the first picture shows the assembled product. When the design has more than one part, the second picture shows the part alone.
The designer in the chat
open_designer shows the designer in ChatGPT, Claude and other apps that support MCP Apps. The designer shows the product in 3D with parts, materials and checks, and follows every change. Your person can also change the design there, and the design page on summonmade.com shows the same design.
The designer gets a ticket in the tool result, out of your sight. The ticket opens the design's live connection and the design files for 2 hours. See Designs in the API reference for the live connection.
Orders
order_design takes the design_id, the shipCountry, and optionally the number of products (quantity), the parts to order and notes for the maker. The tool makes one order for each part, because an order has one process and one material:
- The order has the part's process, material, finish, and the part quantity times the number of products.
- The order gets the part's mesh as
{part}.stl. A sheet-metal part made withsheet()also gets the DXF of the flat blank as{part}-flat.dxf. - The order goes to the quote at once. Most orders get their price at once;
get_ordershows the price. - A circuit board from
set_boardgets its Gerber and drill files as{part}-gerber.zip. An assembled board also gets the BOM as{part}-bom.csvand the pick-and-place list as{part}-pick-and-place.csv. The order has the board's finish, and the order notes have the board options. A person at Summonmade prices the parts of an assembly. - A
pcbpart with only a script shape gets no order. Make the board withset_boardfirst.
A failed check blocks the order. The design lists the orders, and every open designer shows them.
View this page as Markdown. Updated on .