Skip to main content
Glama

HexSketch

Draw a structure

render_structure
Read-only

Draw a chemical structure, or a reaction scheme (reaction), as a publication-quality image (PNG by default), with its name, SMILES, formula and a link that opens it in HexSketch at hexsketch.com, where the user can edit it by drawing. Give structures as SMILES, not names. Check the name and formula returned against what you meant, and always give the user the link; where you can show a web page beside the chat (a preview pane, a browser tool), open the link there too. Draw every reaction as a scheme: reagents above the arrow, solvent, temperature, time and yield below; a whole synthesis or retrosynthesis as one scheme (then); a mechanism as steps, all on one page (with cycle: true for a catalytic cycle, drawn round a circle).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "render_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
cycleNo
stepsNoA mechanism on one page: steps, each its species as SMILES with atom-map numbers, its curly arrows (given as for arrows) and a few words naming it.
styleNoDrawing style: hexsketch (default) or acs (ACS 1996 journal style).
arrowsNoCurly (electron-pushing) arrows for a mechanism step, drawn on the structure or reaction given in the same call. Give it as SMILES with atom-map numbers on the atoms the arrows touch, e.g. "[OH-:1].[CH3:2][Br:3]" with arrows [{from:[1],to:[1,2]},{from:[2,3],to:[3]}]. A mapped atom written as just its element ([C:1]) keeps its usual hydrogens; separate species are drawn close together, the attacking one beside the atom it attacks. HexSketch places each arrow clear of the drawing.
formatNoOutput format; default png. PDF needs save_to.
reactionNoA reaction scheme instead of a single structure: starting materials, an arrow with the reagents above it and the solvent and conditions below, and the products. Use it for every reaction or synthetic step.
structureNoThe structure: SMILES (e.g. "CC(=O)Oc1ccccc1C(=O)O"), molfile or CDXML text, or a HexSketch link (https://hexsketch.com/#smiles=... or #cdxml=...). Not a name.
disconnectNoRetrosynthesis: bonds of the target to mark as disconnections, by their atoms' map numbers in the SMILES. [[1, 2]] draws a wavy line across the bond 1–2. With a reaction, the marks go on its first stage, the target: give the map numbers there only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds real content beyond them: what comes back (name, SMILES, formula, a HexSketch edit link), that PNG is the default, and that a preview pane or browser should be used to open the link. It does not describe size limits, latency, or failure modes for invalid SMILES, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and default format are front-loaded, which is right. But the single dense paragraph then packs in verification advice, link-sharing policy, UI guidance, and reaction/mechanism conventions as run-on clauses, so the reader cannot scan headings or priorities; several instructions (draw as a scheme, reagents above/below) partly duplicate the schema text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter nested tool with no output schema, the description carries its share: it states the returned fields, the default format, and the reaction/mechanism/cycle conventions. Gaps remain around style selection, non-PNG formats, save_to, and disconnect, but those are documented in the schema, so nothing critical is missing.

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 coverage is already 88%, so the baseline is 3; the description earns above that by narrating the less obvious parameters — 'a mechanism as steps, all on one page (with cycle: true for a catalytic cycle, drawn round a circle)' and the whole reaction/then/arrows convention. It adds the conceptual model (reagents above the arrow, conditions below, whole retrosynthesis as one scheme) that the schema fields alone list but do not motivate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first clause pairs a specific verb (Draw) with specific resources (a chemical structure or a reaction scheme) and states the default output (PNG), so an agent immediately knows this is a rendering tool. It does not name or exclude any sibling, so an agent must still infer the boundary against convert_structure or structure_link on its own.

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?

Strong directive usage: 'Give structures as SMILES, not names', 'Check the name and formula returned against what you meant', 'always give the user the link', 'Draw every reaction as a scheme', plus the mechanism-to-steps and cycle:true routing. These are clear when/how instructions for a competent agent. It stops short of a 5 because it never says when to prefer this over the drawing-adjacent siblings, and no explicit exclusions are given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.