Skip to main content
Glama

print_export

Export each colour group of a molecular structure as a separate watertight STL file, ready for multi-material 3D printing slicers.

Instructions

Exports a structure as watertight STL files ready for multi-colour 3D printing.

Each colour group becomes one STL file. PyMOL's OBJ exporter writes the whole visible scene, so each group is isolated on its own before export, then rebuilt into a single watertight, manifold solid. All groups share the same coordinate frame, so a slicer can load them as aligned multi-material parts (e.g. add the second STL as a "part" of the first in Bambu Studio).

Requires the optional print extra (trimesh, pymeshlab); see the install hint returned if the libraries are missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupsYesSemicolon-separated ``label=selection`` pairs, one per colour. Example: "protein=polymer.protein; nucleic=polymer.nucleic".
methodNo"auto" (light cleanup if the export is already watertight, else poisson with voxel fallback), "poisson" (keeps detail, best for bulky chains), or "voxel" (robust for thin nucleic acids).auto
out_dirNoDirectory for the STL files (default: current directory)..
obj_nameYesPyMOL object to export (e.g. "1abc").
voxel_pitchNoVoxel size in Angstrom for the voxel method. Smaller keeps more detail; 0.7 keeps a ~10 A helix intact.
poisson_depthNoScreened-Poisson octree depth; higher = more detail.
representationNoWhat geometry to export. "surface" (default, unchanged) isolates each group as its own temp object and exports its molecular surface. "cartoon" exports the *currently displayed* cartoon geometry of the real objects, preserving per-residue rep flags and per-object cartoon type (e.g. a `cartoon tube` spine from :func:`print_ribbon_view`). In cartoon mode each group must name whole object(s) — one colour per object (e.g. "1abc or 1abc_spine") — and groups are isolated by toggling object visibility, no temp objects.surface

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it explains per-colour-group STL isolation, the OBJ exporter's behavior, coordinate-frame alignment, method selection, and missing-library handling. It even clarifies representation-mode differences, providing rich, non-obvious behavioral context.

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?

Every sentence adds a distinct piece of information: purpose, grouping behavior, underlying exporter rationale, alignment for slicers, and dependency requirement. It is front-loaded with purpose and contains no redundant 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?

Despite 7 parameters and no annotations, the description covers prerequisites, method behavior, representation modes, and output alignment. An output schema exists, so return-value details need not be in the description; this tool is fully contextualized.

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 descriptions cover 100% of parameters, so the baseline is 3. The description adds value beyond the schema by explaining why groups are isolated, how slicers can align them, and how method choices affect output, supplementing but not replacing schema details.

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 opens with a specific verb+resource+output: exports a structure as watertight STL files for multi-colour 3D printing. It clearly distinguishes this from generic save/png/render siblings by specifying STL format and the multi-colour printing use case.

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?

The first sentence establishes the specific use case (multi-colour 3D printing) and the optional print extra prerequisite is stated. It doesn't explicitly name sibling alternatives to avoid, but the unique format and workflow make the intended context clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chemrich/MCPymol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server