Skip to main content
Glama

ParCAD

Export a part to a file

export_part
DestructiveIdempotent

Export a part and return the absolute path written. format is 3mf for printing — what Bambu Studio, OrcaSlicer, PrusaSlicer and Cura open, with every body its own named object in millimetres — stl for a bare mesh any tool reads, or step for exact surfaces, for another CAD program or a machine shop. Files are written to the parcad export directory; the filename must have no directory part. On a hosted parcad the reply also carries url, a signed link that fetches the file with no token until it expires, and path is then relative to the account's folder. The reply's measured describes the part in the file, off the same build that wrote it: size, volume, watertight, bodies, voids, and for 3MF and STL the deflection_mm every triangle is within. Reuses the build of an earlier evaluate_part on the same script; timeout_s gives a heavy part longer.

A part that returns several bodies (return { base, lid }) is written whole by default — one object per body in 3MF, one solid per body in STEP, every body's triangles merged into one STL, where a slicer can no longer tell them apart — and measured.named_bodies then measures each body in the file. Pass body: "lid" to write that one body alone. A .reference() body is never in the file and cannot be asked for by name.

STL and 3MF describe closed solids and refuse a part with a surface body, naming .thicken(t); STEP carries surfaces exactly.

A part whose print_check fails — material under 0.3 mm, where nothing prints — or that carries its own checks and fails one is refused, with the finding or the check and its measurement named, and nothing is written. allow_failing carries the user's words accepting that it fails, for writing it anyway; the reply keeps it and the file carries it: in an STL's header, a STEP comment, or a 3MF's Description. The reply opens with print_check and checks, the verdicts the file was written under; a flagged print_check writes the file and lists what to read.

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": {
      "format": "<format>"
    },
    "name": "export_part"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoFor a part that returns several bodies (`return { base, lid }`): the name of the one body to write on its own, e.g. `lid`. Omit to write every body into one file — an object per body in 3MF, a solid per body in STEP, all of their triangles in one STL. Refused by name when the part has no such body.
editsNoChanges to make before building, in order, each { old, new } replacing text that appears exactly once; nothing is written back to the part.
formatYes`3mf` for a slicer, `stl` for a bare mesh, or `step` for exact surfaces.
scriptNoA parcad DSL script ending in a returned shape. Give this or `project`, not both.
projectNoThe part to export instead of sending it, as list_projects spells it, or "@session" for the script on the user's screen.
filenameNoFile name to write, without any directory part. Defaults to `part.3mf` / `part.stl` / `part.step`.
timeout_sNoSeconds the kernel may take, 1 to 600. Defaults to 20, or PARCAD_OCCT_TIMEOUT. Reuses the build of an earlier evaluate_part on the same script when there is one.
allow_failingNoThe user's words accepting that the part fails a check or the print check, such as "export it, I'll ream the bore out". Fixed dimensions in a brief, or the request for the file, accept no failure. Without it a failing verdict refuses the export, naming it and what was measured; with it the reason is kept in the reply.

Output Schema

NameRequiredDescriptionDefault
urlNo
pathYes
briefNo
bytesYes
checksNo
formatYes
openedNo
measuredYes
downloadedNo
open_errorNo
print_checkNo
allow_failingNo
script_sha256Yes
matched_looselyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint and idempotentHint, but the description adds substantial context beyond them: output goes to the export directory, filename must be bare, hosted deployments return a signed `url` with `path` relative to the account folder, and refusals on print_check/checks write nothing. The disclosure of how `allow_failing` is persisted into the STL header, STEP comment or 3MF Description is exactly the kind of behavioral detail annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and format, then refusals and hosting, which is the right order. It is long (four paragraphs) and some material overlaps the schema descriptions, but nearly every sentence carries an operational fact rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the description still names the key reply fields (measured, named_bodies, url, print_check, checks) that matter for interpretation. For a tool that mutates the filesystem, has 8 parameters and a complex failure model, nothing an agent needs to call it correctly appears to be missing.

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%, so 3 is the baseline, but the prose genuinely adds meaning the schema does not: what each `format` value implies on disk (per-body named objects in mm, merged triangles in STL), the served-URL behavior behind `path`, and the fact that `timeout_s` reuses an earlier evaluate_part build. The `.reference()` body exclusion is a semantic constraint absent from 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?

Opens with a specific verb and resource ('Export a part and return the absolute path written'), then immediately distinguishes the three format targets and their consumers (slicer, mesh tool, CAD/machine shop). An agent can tell this apart from evaluate_part, view_part and probe_part without opening any schema.

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

Usage Guidelines4/5

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

Format selection is spelled out by use case, body selection has an explicit rule ('Pass body: "lid"' vs write-all default), and allow_failing is scoped to when the user has accepted a failure. It does not explicitly route to a sibling (e.g. preview with view_part first), which keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.