Skip to main content
Glama

render_to_png

Render CDXML reaction schemes to high-resolution PNG images using ChemDraw's native engine at 300 DPI.

Instructions

Render a CDXML file to PNG using ChemDraw COM.

Uses ChemDraw's native rendering engine (via COM automation) at 300 DPI with a solid white background. ChemDraw must be installed (Professional 16+) and closed before calling this tool.

This tool uses ChemDraw COM exclusively — no RDKit fallback. For a quick preview without ChemDraw, use draw_molecule which returns CDXML that can be opened directly.

Args: cdxml_path: Path to the CDXML file to render. output_path: Output PNG path. If not given, writes to the same directory as the input with a .png extension.

Returns: Dict with keys: ok, input, output (absolute path to PNG file). Returns {ok: False, error: "..."} if ChemDraw COM is unavailable or rendering fails.

Safety override: Render CDXML to a validated PNG through a staging file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cdxml_pathYes
output_pathNo
Behavior4/5

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

Since no annotations are provided, the description carries the full burden. It discloses key behaviors: COM automation, 300 DPI, white background, the requirement that ChemDraw be closed, and the lack of an RDKit fallback. It also explains output path defaults and error return format. However, the 'Safety override: Render CDXML to a validated PNG through a staging file' line is cryptic and unexplained, and it does not mention potential side effects like overwriting existing files.

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?

The description is well-structured with a leading purpose, details, Args, Returns, and a safety note. It is front-loaded with the core function. However, the 'Safety override' sentence is out of place and adds confusion without clear benefit, making the description slightly less concise than it could be.

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?

The description is complete for a tool with external dependencies: it covers installation requirements, prerequisites (ChemDraw closed), output behavior, return dict keys, and error handling. It also names an alternative tool for fallback. Nothing essential is missing for an agent to invoke it correctly.

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?

Schema coverage is 0% (the schema provides no descriptions), so the description must compensate. It does so with an Args section that explains cdxml_path (path to CDXML file) and output_path (default behavior: writes to same directory with .png extension). This adds meaning beyond the bare schema, making parameter usage clear.

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 opening sentence states a specific verb, resource, and output: 'Render a CDXML file to PNG using ChemDraw COM.' It clearly distinguishes from siblings by explicitly mentioning 'no RDKit fallback' and naming draw_molecule as an alternative, so an agent knows exactly what this tool does and what it is not.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool (requires ChemDraw Professional 16+ and that it be closed) and provides an alternative for quick previews: 'For a quick preview without ChemDraw, use draw_molecule which returns CDXML that can be opened directly.' This gives clear when-to-use and when-not-to-use guidance.

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/ZiChenWang114514/cdxml-toolkit-community'

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