Skip to main content
Glama

Draw molecule

draw_molecule
Read-onlyIdempotent

Draw a clean inline 2D structure of one molecule and highlight key atoms or groups so explanations of functional groups, stereochemistry, or reactivity are easy to follow.

Instructions

Show a clean 2D structure of ONE molecule inline in the explanation. Call it when the explanation refers to a specific molecule's structure (functional groups, protecting groups, stereochemistry, why it reacts as it does). Put each figure next to the paragraph about that molecule: when comparing two molecules, draw the first, explain it, then draw the second and explain it; do not draw both first. When the text is about part of the molecule (a group, an atom, a bond), highlight that part with highlights so the reader sees what the sentence refers to. If the user selected atoms in a card, redraw from the atom-mapped SMILES they sent and highlight those atom numbers. For a reaction or mechanism step use draw_reaction_step instead. Do not call it for trivial species (H2O, HCl) or purely conceptual answers. If the tool reports invalid SMILES, fix the SMILES and call again.

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
labelNoShort caption shown under the structure, in the user's language (e.g. 'R–O–TBS 硅醚').
smilesYesSMILES of the molecule. Use '*' for a generic substituent R. Write stereochemistry (@, @@, /, \) only when it matters for the explanation.
highlightsNoOptional coloured halos that point at what the explanation talks about, e.g. [{"smarts": "C=O", "color": "red"}] for the carbonyl, or [{"atoms": [1], "color": "blue"}] for the atom written [NH2:1] in the SMILES. Use 1–2 colours; highlight only what the next sentences discuss. Atom-map numbers are not drawn.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.7/5.0
Behavior4/5

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

The annotations already establish that this is a safe, read-only, idempotent operation, so the safety burden is low. The description adds useful behavioral context: it renders inline beside the relevant paragraph, handles user-selected atom-mapped SMILES, and says to fix and retry invalid SMILES.

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 definition is front-loaded with the core action, then layers on sequencing, highlighting, alternatives, and failure handling. Despite its length, each sentence carries actionable guidance and avoids redundant restatement of the schema.

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 a moderate-complexity drawing tool with full schema coverage and no output schema, the description covers the important execution context. It addresses placement, comparison order, highlighting, selection handling, alternatives, exclusions, and invalid-SMILES recovery.

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 description coverage is 100%, so the baseline is 3, but the description adds practical meaning beyond the schema. It explains when to use highlights, how to align atom-map numbers from selected atoms, and when stereochemistry in SMILES matters.

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 states a specific verb and resource: 'Show a clean 2D structure of ONE molecule inline in the explanation.' It clearly distinguishes the tool from draw_reaction_step and gives the agent a concrete output expectation.

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?

It gives explicit when-to-use guidance, including structure-focused explanations, comparison sequencing, atom-selection redraws, and highlighting parts of a molecule. It also names exclusions (trivial species, purely conceptual answers) and a direct alternative for reactions or mechanisms.

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