Skip to main content
Glama

Lone Pair

Draw a structure

draw
Read-onlyIdempotent

Draw a chemical structure or reaction as a publication-style figure (ChemDraw-like skeletal formula) with the Lone Pair editor's renderer. Give SMILES, reaction SMILES, InChI, a molfile, a ChemDraw file, or a compound name with name=true. Refused, with the reason, instead of drawn wrongly: SMILES that cannot be read, aromatic rings that cannot alternate single and double bonds, and atoms with too many bonds (unless as_written). The result carries drawing (Lone Pair JSON to pass to edit_drawing or back in as input) and notes (anything changed on reading or lost in the format). The SVG and PNG hold the drawing inside them, so they reopen for editing at lonepair.app.

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": "draw"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNoPNG resolution, 300 by default; 600 for print.
nameNoSet to true when `input` is a compound name (e.g. "aspirin") rather than a structure. The name is sent to PubChem to find the structure; this is the only network call the server makes. Default false.
inputNoThe structure as text: SMILES, reaction SMILES (reactants>agents>products), InChI, a molfile, RXN, SD file, CDXML, CML or Marvin text, or a Lone Pair drawing (the JSON from an earlier result, or the SVG text of an earlier figure).
styleNoJournal style. acs = ACS Document 1996 (default), rsc = RSC, nature = Nature Reviews, slides = heavier lines for slides.
formatNopng (default; returned as an image), svg (returned as text), pdf or eps (returned as base64 in `data_base64`).
opaqueNoWhite background instead of transparent (SVG, PNG). Default false.
as_writtenNoDraw atoms that have too many bonds instead of refusing the structure. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, open-world, non-destructive, so the description is not carrying the safety burden; it instead adds genuinely new behavior — the refusal policy with three named failure modes, the `notes` field for lossy conversions, and the fact that SVG/PNG embed an editable drawing. The PubChem network call is restated from the schema rather than newly disclosed.

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-loads the core purpose, then input forms, then refusal semantics, then return fields — a logical order with no filler sentences. It is dense with backticked identifiers and parentheticals, which slightly slows scanning but each sentence carries 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?

Despite having no output schema, the description explains what the result carries (`drawing`, `notes`) and how each format behaves, covering the full call-and-return cycle. For a stateless rendering tool with fully documented parameters, nothing material is missing.

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?

With schema description coverage at 100%, the schema already documents all seven parameters including input formats, name=true, dpi, style, format, opaque, and as_written. The description mostly restates those (input types, name=true, as_written), adding only the round-trip hint that `drawing` can be fed back as `input`, which the schema also implies.

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?

States a specific verb and resource ('Draw a chemical structure or reaction as a publication-style figure') and adds a concrete rendering reference (ChemDraw-like skeletal formula, Lone Pair renderer). It does not, however, distinguish itself from the sibling render_reaction, which by name appears to cover overlapping reaction rendering territory.

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 clear triggering context: supply SMILES, reaction SMILES, InChI, molfile, ChemDraw file, or a name with name=true, and it names edit_drawing as the downstream consumer of the `drawing` output. It stops short of explicit when-not-to-use or direct comparison against convert/render_reaction.

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.

Resources