Skip to main content
Glama

Draw a reaction scheme

generate_reaction
Idempotent

Draw reaction schemes from IUPAC names or SMILES, reactants, products, conditions, and arrow labels, and export PNG/SVG files for reaction explanations or explicit drawing requests.

Instructions

Draw a reaction scheme from reactants, products and conditions.

Writes PNG/SVG files and returns a panel with conditions above and below the arrow. arrow: "forward" (→), "equilibrium" (⇌, reversible) or "retro" (⇒). Use it when explaining a reaction as well as for explicit drawing requests. Pass English or IUPAC compound names, or SMILES.

Not this tool for: the step-by-step SN1, SN2 or Fischer esterification mechanism with electron-flow arrows (use generate_mechanism); a TLC plate sketch from Rf values, even of a reaction mixture (use generate_tlc); one compound or a property of one compound such as its acidity (use generate_molecule), independent structures (use batch_generate), or structural differences (use compare_molecules).

Curved-arrow mechanisms are drawn only for SN1, SN2 and Fischer esterification (generate_mechanism). For any other mechanism, such as Diels–Alder, draw the net scheme here and tell the user that the arrow mechanism is not drawn.

Args: reactants: English/IUPAC reactant names or SMILES. products: English/IUPAC product names or SMILES. conditions: Text above the arrow (e.g. 'H2SO4, 0-5 °C'); formula digits are subscripted. conditions_below: Text under the arrow (e.g. 'reflux, 2 h'). arrow: "forward" (→), "equilibrium" (⇌) or "retro" (⇒, target as reactants, precursors as products). name: Display name (can be localized). formats: Any of "png", "svg", "cdxml" (default png + svg); "cdxml" only for editing in ChemDraw. abbreviate_groups: True draws common substituents as labels (Ph, OAc, tBu …); the CDXML keeps full structures. render_style: "" standard · "compact" small print · "presentation" slides · "grayscale" b/w palette. coefficients: One integer per species, reactants then products ([2, 1, 2] draws 2 H2 + O2 → 2 H2O). Set only when the user asks for a balanced equation; otherwise draw as given — the panel's "Apply coefficients" button sets them.

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": {
      "reactants": "<reactants>",
      "products": "<products>"
    },
    "name": "generate_reaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
arrowNoforward
formatsNo
productsYes
reactantsYes
conditionsNo
coefficientsNo
render_styleNo
conditions_belowNo
abbreviate_groupsNo

Output Schema

NameRequiredDescriptionDefault
nameNo
typeNoreaction
arrowNoforward
filesNo
balanceNo
requestNo
productsNo
reactantsNo
cdxml_pathNo
conditionsNo
coefficientsNo
conditions_belowNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.6.0
    • addedInput schema / properties / arrow
      Added value: +{
      +  "default": "forward",
      +  "enum": [
      +    "forward",
      +    "equilibrium",
      +    "retro"
      +  ],
      +  "title": "Arrow",
      +  "type": "string"
      +}
    • addedInput schema / properties / coefficients
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Coefficients"
      +}
    • addedInput schema / properties / conditions_below
      Added value: +{
      +  "default": "",
      +  "title": "Conditions Below",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / MolEntry / properties / coefficient
      Added value: +{
      +  "default": 1,
      +  "title": "Coefficient",
      +  "type": "integer"
      +}
    • addedOutput schema / $defs / ReactionBalance
      Added value: +{
      +  "description": "Atom and charge balance of the equation as drawn (all coefficients 1).",
      +  "properties": {
      +    "balanced": {
      +      "title": "Balanced",
      +      "type": "boolean"
      +    },
      +    "chargeDifference": {
      +      "default": 0,
      +      "title": "Chargedifference",
      +      "type": "integer"
      +    },
      +    "difference": {
      +      "additionalProperties": {
      +        "type": "integer"
      +      },
      +      "default": {},
      +      "title": "Difference",
      +      "type": "object"
      +    },
      +    "formulas": {
      +      "default": [],
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Formulas",
      +      "type": "array"
      +    },
      +    "note": {
      +      "default": "",
      +      "title": "Note",
      +      "type": "string"
      +    },
      +    "suggestedCoefficients": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": "integer"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Suggestedcoefficients"
      +    },
      +    "suggestedEquation": {
      +      "default": "",
      +      "title": "Suggestedequation",
      +      "type": "string"
      +    },
      +    "summary": {
      +      "default": "",
      +      "title": "Summary",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "balanced"
      +  ],
      +  "title": "ReactionBalance",
      +  "type": "object"
      +}
    • addedOutput schema / properties / arrow
      Added value: +{
      +  "default": "forward",
      +  "title": "Arrow",
      +  "type": "string"
      +}
    • addedOutput schema / properties / balance
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ReactionBalance"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / coefficients
      Added value: +{
      +  "default": [],
      +  "items": {
      +    "type": "integer"
      +  },
      +  "title": "Coefficients",
      +  "type": "array"
      +}
    • addedOutput schema / properties / conditions_below
      Added value: +{
      +  "default": "",
      +  "title": "Conditions Below",
      +  "type": "string"
      +}
    • addedOutput schema / properties / request
      Added value: +{
      +  "additionalProperties": true,
      +  "default": {},
      +  "title": "Request",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true), the description discloses side effects —'Writes PNG/SVG files'—and the mechanism-scope limit that only SN1/SN2/Fischer esterification get curved arrows. It also notes that the CDXML output differs from the rendered image (full structures kept despite abbreviation). It does not say where files land, how they are named, or whether existing files are overwritten, which is a real gap for a write operation.

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 long but well front-loaded: purpose, then arrow vocabulary, then exclusions, then per-argument detail. Some redundancy exists—the arrow enum and its symbols are stated twice, once in prose and again in Args—but every other sentence adds routing or parameter information.

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 10 parameters, two required, zero schema descriptions, and an output schema that covers return values, the description supplies everything missing: all ten arguments documented plus behavioral boundaries against five siblings. An agent can call it correctly on the first attempt without consulting other tools.

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 description coverage is 0% across 10 parameters, so the description carries the full burden and does: each argument is given meaning beyond its name, including subscripting of formula digits in conditions, the retro arrow's target/precursor convention, SMILES-or-name input, cdxml being editing-only, and abbreviate_groups preserving full structures in CDXML. The coefficients note is especially valuable, warning to set it only for balanced equations because the panel exposes an 'Apply coefficients' button.

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 names a specific verb and resource ('Draw a reaction scheme from reactants, products and conditions') and immediately specifies the output artifact (PNG/SVG files, panel with conditions above and below the arrow). It goes further by enumerating arrow variants and distinguishing itself from generate_mechanism, generate_tlc, generate_molecule, batch_generate and compare_molecules, so an agent can identify it without opening any schema.

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 states both when to use it ('explaining a reaction as well as for explicit drawing requests') and an explicit 'Not this tool for' list mapping each adjacent use case to the correct sibling, including a hard boundary for curved-arrow mechanisms. The fallback instruction for unsupported mechanisms (draw the net scheme here and tell the user) closes the last routing ambiguity.

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