Skip to main content
Glama

print_export

Exports molecular structures as watertight STL files, one per colour group, for multi-colour 3D printing.

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.

Args: obj_name: PyMOL object to export (e.g. "1abc"). groups: Semicolon-separated label=selection pairs, one per colour. Example: "protein=polymer.protein; nucleic=polymer.nucleic". out_dir: Directory for the STL files (default: current directory). method: "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). voxel_pitch: Voxel size in Angstrom for the voxel method. Smaller keeps more detail; 0.7 keeps a ~10 A helix intact. poisson_depth: Screened-Poisson octree depth; higher = more detail. representation: What 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupsYes
methodNoauto
out_dirNo.
obj_nameYes
voxel_pitchNo
poisson_depthNo
representationNosurface

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It explains the export process (isolation of groups, rebuilding into watertight solid, shared coordinate frame) and mentions the requirement for the 'print' extra, which is critical for the agent to understand dependencies and outcomes.

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 well-structured with clear sections, bullet points, and an example. Despite its length, every sentence serves a purpose—explaining functionality, parameters, or use cases—without redundancy. It is front-loaded with the main purpose and progressively adds details.

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?

Given the tool's complexity (7 parameters, 2 required, no enums, output schema present), the description covers all aspects: parameter details, method selection criteria, representation modes, and the underlying workflow. It equips an agent to use the tool correctly without needing additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, but the description compensates fully by explaining each parameter: obj_name, groups (with format example), out_dir, method with options, voxel_pitch, poisson_depth, and representation with detailed behavior. This adds significant meaning beyond the schema's bare types and defaults.

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 clearly states that the tool exports a structure as watertight STL files for multi-colour 3D printing, specifying the output format and the grouping strategy. This is specific and distinguishes it from most sibling tools that focus on visualization, analysis, or other operations.

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 description provides detailed guidance on when to use each method ('auto', 'poisson', 'voxel') and representation mode ('surface', 'cartoon'), including specific examples and caveats. While it does not explicitly state when not to use the tool, the context is clear enough for an agent to make an informed choice.

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