Skip to main content
Glama

generate_reaction

Draw net reaction schemes from reactant and product names or SMILES, with conditions above and below arrows, and export PNG, SVG, or ChemDraw-editable CDXML.

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. This draws the net reaction, without step-by-step electron-flow mechanisms. Pass English or IUPAC compound names, or SMILES.

Not this tool for: 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).

Args: reactants: List of English/IUPAC reactant names or SMILES strings. products: List of English/IUPAC product names or SMILES strings. conditions: Text above the arrow (e.g. 'H2SO4, 0-5 °C'); formula digits are subscripted, a line break starts a new line. conditions_below: Text under the arrow (e.g. 'reflux, 2 h'). arrow: "forward" (→), "equilibrium" (⇌, reversible reaction) or "retro" (⇒, retrosynthesis: target as reactants, precursors as products). name: Display name for the reaction step (can be localized). formats: Any of "png", "svg", "cdxml" (default: png + svg). Add "cdxml" only when the scheme is to be edited in ChemDraw. abbreviate_groups: True draws common substituents as short labels (Ph, OAc, OMe, CO2H, tBu, Boc …); 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.

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?

With no annotations, the description does the heavy lifting: it discloses side effects (writes PNG/SVG/CDXML files), the return artifact (a panel with conditions above/below the arrow), and a limitation (no electron-flow mechanisms). It also warns that coefficients are only applied on request and that the CDXML keeps full structures under abbreviation. Missing only concrete file locations or overwrite behavior.

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?

Front-loaded with purpose, then exclusions, then a per-argument list — easy to scan. It loses a point for duplicating the arrow enum definition verbatim in both the opening paragraph and the Args block.

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?

For a 10-parameter generative tool with an output schema, everything an agent needs is present: triggers, exclusions, input formats, output formats and defaults. Return value explanation is correctly omitted since an output schema exists.

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%, and the description fully compensates: it defines every non-obvious parameter, gives the enum meanings for arrow with glyphs and the retro semantics, enumerates formats with a default, explains render_style values, and specifies coefficients ordering ('reactants then products') with a worked example.

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?

Opens with a specific verb+resource ('Draw a reaction scheme from reactants, products and conditions') and immediately scopes it as the net reaction rather than a mechanism. Explicitly names each sibling it is not for and what to use instead.

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?

Gives both a positive trigger ('Use it when explaining a reaction as well as for explicit drawing requests') and an explicit exclusion block listing generate_molecule, batch_generate and compare_molecules with the condition that selects each.

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