Skip to main content
Glama

Draw Molecule

draw_molecule
Read-onlyIdempotent

Render a molecule from SMILES inline in an interactive 3D viewer, showing stereochemistry and IUPAC numbering for chemistry analysis.

Instructions

Render a molecule from SMILES in the interactive MolTalk viewer, shown inline to the user (the drawing can be rotated in 3D). A successful result (rendered: true) is already on screen; its structuredContent holds the molecular analysis, stereochemistry and depicted_stereo_bonds (this drawing's wedges and dashes, each with an explanation). draw_named_molecule resolves a compound name and draws it in one call. label: display caption, such as the compound name; it is checked against MolTalk's library (label_check). numbering: "none" (default; the viewer can switch numbers on), "iupac" (locants from the verified IUPAC name when unambiguous, otherwise atom indices) or "indices". hydrogens=true displays every hydrogen. include_svg=true also returns the SVG, for clients without the viewer. IUPAC naming may query PubChem when the exact structure is not in MolTalk's bundled library.

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": {
      "smiles": "<smiles>"
    },
    "name": "draw_molecule"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNo
widthNo
heightNo
smilesYes
hydrogensNo
numberingNonone
include_svgNo
atom_indicesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: a successful call is already rendered on screen (rendered: true), the viewer allows 3D rotation, the label is checked against MolTalk's library, and IUPAC naming may query PubChem over the network (consistent with openWorldHint). It does not describe failure behavior for invalid SMILES or what rendered: false implies.

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?

Dense but front-loaded: the render action and inline-result contract come first, then the sibling alternative, then parameters. The semicolon-chained parameter sentences are efficient, though the paragraph is long and could be split for scanability.

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?

With no output schema, the description compensates by summarizing what structuredContent returns (molecular analysis, stereochemistry, depicted_stereo_bonds with wedge/dash explanations) and by flagging the external PubChem dependency. Given 8 parameters and rich annotations, an agent has enough to invoke it correctly; only sizing params are omitted.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must carry parameter meaning, and it covers only half of them: label, numbering (with values none/iupac/indices and their semantics), hydrogens, and include_svg. Width, height, and especially atom_indices (default true) are left completely unexplained in both schema and description.

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?

States a specific verb and resource (render a molecule from SMILES) plus the destination surface (interactive MolTalk viewer, inline, 3D-rotatable). It also distinguishes itself from the sibling draw_named_molecule by noting that sibling resolves a name and draws in one call.

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?

Gives conditional guidance for two parameters (include_svg=true for clients without the viewer; hydrogens=true to show all hydrogens) and routes name-based drawing to draw_named_molecule. It stops short of saying when this tool is the wrong choice versus analyze_molecule or conformer_3d, so it is clear but not fully exhaustive.

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