Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Draw chemical structures and reaction schemes as PNG/SVG files with an interactive panel, and compute the numbers behind them.

  • A bare compound name ("caffeine") means generate_molecule. Use it also while explaining a compound when its structure helps.

  • A pH, buffer recipe or degree of ionisation asked as a number: calculate_ph, also when you could work it out yourself — it solves the exact charge balance and shows the approximation beside it.

  • Several individual structures: batch_generate.

  • Structural differences between two to four compounds: compare_molecules.

  • Reactants, products and conditions: generate_reaction.

  • SN1, SN2 or Fischer esterification step by step with curved arrows: generate_mechanism (draws the user's substrates within each family's limit; other mechanisms are not drawn).

  • Shape in space (geometry, conformation, a rotatable model): generate_3d.

  • One named value as text (CAS number, melting point, GHS hazards, biological role, pathways): lookup.

  • Which IR bands or how many ¹H NMR signals a structure should give, or which group absorbs at a measured wavenumber: predict_spectrum.

  • Any spectrum picture (IR, NMR, MS, UV/Vis), also "schematic" and without peak values: generate_spectrum, not a generic chart — supply typical literature peaks yourself.

  • A TLC plate sketch from Rf values: generate_tlc.

  • pH against added titrant volume: generate_titration_curve. Fractions of each protonation species across pH 0–14: generate_species_distribution.

  • A compound's data sheet: lookup_molecule_data. The molecule panel's Data button also retrieves it on demand; database access needs the internet.

  • The user has to learn or revise something → offer export_anki_deck and write the cards yourself. The molecule panel's Add to Anki button adds a single structure card.

Pass English or IUPAC compound names; SMILES are always safe. Labels may be localized. Drawing tools write their files themselves — never call save_png, that is the panel's export button.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
generate_moleculeA

Draw one compound as a 2D structure — the default for a single substance.

Writes PNG/SVG files and an interactive panel (properties, functional groups). A bare compound name ("caffeine") also means this tool, and so does a question about why one compound behaves as it does (acidity, solubility) — the answer is in its structure. A Fischer or Haworth projection of a sugar or amino acid, or a drawing with all H atoms, is this tool too: set view to "fischer", "haworth" or "all_h".

Not this tool for: several individual structures (use batch_generate), structural differences (use compare_molecules), a reaction scheme (use generate_reaction), a data sheet (use lookup_molecule_data), a single named value such as melting point, CAS number or GHS hazards (use lookup), the IR bands or ¹H signals to expect (use predict_spectrum), a spectrum drawing (use generate_spectrum), which species of an acid dominates at a given pH (use generate_species_distribution), or a rotatable 3D model or the shape in space (use generate_3d).

Args: name_or_smiles: English/IUPAC compound name or SMILES string. label: Display name shown below the structure (may be localized). formats: Any of "png", "svg", "cdxml" (default: png + svg). Add "cdxml" only when the structure is to be edited in ChemDraw. annotate_stereo: True prints CIP descriptors (R/S, E/Z) at each stereocenter. abbreviate_groups: True draws common substituents as the short labels chemists write by hand (Ph, Bn, OAc, OMe, CO2H, NO2, tBu, Boc, Ts, TMS). The chemistry is unchanged; no hover tooltips in the panel. render_style: "" standard · "compact" thin bonds for small print · "presentation" thick bonds for slides · "grayscale" b/w palette. stereo_variants: True returns every stereoisomer of the open centers (max 3) as a pick list instead of a drawing; only on request. view: "fischer"/"haworth"/"all_h" opens on that drawing, only if the user names it.

generate_spectrumA

Draw a spectrum — IR, ¹H/¹³C NMR, mass spectrum (MS), UV/Vis, Raman, NIR, fluorescence, ORD or CD — as PNG/SVG files with a panel.

Any request to draw, sketch, plot or show a spectrum is this tool, including a "schematic" spectrum of a named compound ("aspirin IR spectrum schematic") and requests with no peak values: then supply typical literature peak positions yourself (aspirin IR: C=O ~1750 and ~1690 cm⁻¹, broad O–H ~2500–3300 cm⁻¹). Use it instead of drawing the spectrum as a generic chart or visualization — this tool gets the axis conventions right (IR: inverted wavenumber axis with transmission dips; NMR: ppm right to left; MS: bars). It draws exactly the peaks it is given; it predicts nothing.

Not this tool for: working out WHICH bands to expect, or what a measured wavenumber belongs to (use predict_spectrum — its band list can then be drawn here), or the compound's structure formula (use generate_molecule).

Args: spectrum_type: One of "ir", "nir", "raman", "uv_vis", "fluorescence", "ord", "cd", "nmr_1h", "nmr_13c", "ms". peaks: Peak list. position uses the type's natural unit (cm⁻¹ for ir/nir/raman, nm for uv_vis/fluorescence/ord/cd, ppm for NMR, m/z for ms). intensity is relative on any scale (negative values only for ord/cd). width (optional) is the half-width in x-units; label (optional) annotates the peak in the plot (e.g. "C=O"). title: Display name shown in the plot title, also used for the filename (can be localized, e.g. "Aspirin IR"). formats: Output file formats, any of "png", "svg" (default: both). CDXML is not available for spectra.

generate_tlcA

Draw a TLC plate sketch from Rf values as print-ready PNG/SVG files.

Use this whenever the user reports a thin-layer chromatography result ("TLC of my esterification: educt at 0.3, product at 0.65, the co-spot shows both") or asks for the plate sketch a lab report requires. The tool draws exactly the Rf values it is given — it predicts nothing.

The plate is read from the bottom: start line at Rf 0, solvent front at Rf 1, so a spot at Rf 0.8 sits near the top. One lane = one application point with its own caption; a lane can carry several spots, so a co-spot lane showing educt AND product is simply two spots on one lane. Every spot is annotated with its Rf value so the sketch can be read off.

Not this tool for: the reaction scheme of the reaction being monitored (generate_reaction), or a spectrum (generate_spectrum).

Args: lanes: The lanes from left to right, e.g. [{"name": "Edukt", "spots": [{"rf": 0.30, "label": "Säure"}]}, {"name": "Reaktion", "spots": [{"rf": 0.65, "label": "Ester"}]}, {"name": "Co-Spot", "spots": [{"rf": 0.30}, {"rf": 0.65}]}] rf must lie between 0 and 1 — it is a ratio (distance travelled by the substance / distance travelled by the front), so values outside that range are rejected instead of silently clipped. label (optional) names the substance at that spot; intensity (optional, 0…1, default 1) draws a faint spot fainter. title: Shown in the plot title and used for the filename, e.g. "Veresterung Ansatz 2" (free text, can be localized). solvent: Mobile phase / eluent as it goes into the report, e.g. "Toluol/Ethylacetat 8:2" — printed as a caption on the sketch. detection: How the spots were visualized, e.g. "UV 254 nm", "Iod", "Ninhydrin" — printed next to the mobile phase. formats: Output file formats, any of "png", "svg" (default: both). CDXML is not available for plates.

export_anki_deckA

Export an Anki flashcard deck (.apkg) with rendered chemistry images.

Use this whenever the user wants flashcards, Anki cards or a study deck for molecules, reactions (e.g. pharmacopoeia identity tests) or spectra. A stated intention to learn or an exam coming up is the same request: offer a deck and write the cards yourself.

Two ways to fill the deck. Either pass cards you wrote yourself, or pass curated_deck_id for a ready-made, formula-verified starter deck:

  • "analgesics-structures": structure → name drills for 8 classic analgesics (NSAIDs, paracetamol, morphine, celecoxib).

  • "pheur-identity-basics": classic Ph.Eur. identity tests — reagent, observation and reaction scheme where it helps.

The tool renders the images — YOU supply the card content from your knowledge. Each card side carries text plus at most ONE visual: structure (name or SMILES), reaction ({reactants, products, conditions}) or spectrum ({spectrum_type, peaks, title}). Proven types: structure↔name, identity reactions (question front, scheme back), functional-group recognition, band assignment, name drills.

Re-exporting under the SAME deck name updates existing cards instead of duplicating them — the front identifies the card.

Options: reversed=true drills both directions (one note, two cards); cloze=true makes fill-in-the-blank cards (front.text carries {{c1::...}}, back.text becomes the extra note). "Parent::Child" nests subdecks.

IMPORTANT: structures take English/IUPAC names or SMILES; card TEXTS may be localized. Never deliver via AnkiConnect unless asked.

Args: deck_name: Deck name, also the filename; re-use it to update a deck. Ignored when curated_deck_id is set. cards: The flashcards. Fronts unambiguous, explanations on the back. default_tags: Tags added to every card. deliver: "apkg" (file only), "open" (also opens it in Anki, macOS) or "ankiconnect" (imports via the AnkiConnect add-on). curated_deck_id: "analgesics-structures" or "pheur-identity-basics".

generate_titration_curveA

Draw a titration curve: weak (or polyprotic) acid vs. strong base.

Computes pH against titrant volume from the exact charge balance and marks equivalence points (per protolysis step), the buffer points (pH = pKa at half-equivalence) and optionally the indicator transition range as a shaded band.

Use this when the user asks about titrations, equivalence points, buffer regions or indicator choice. YOU supply the substance data from your knowledge: pKa values in ascending order, sensible concentrations (0.1 M is the classic teaching case) and the indicator's transition range.

Not this tool for: which species dominates at a given pH, or the degree of ionization across the pH range (use generate_species_distribution). A single pH value as a number is not drawn — that is calculate_ph, which solves the same charge balance and shows the working; this tool only draws.

Args: substance: Display name, e.g. "Acetic acid with NaOH" (localizable). pka_values: pKa per protolysis step, ascending (1-3 values). c_acid: Acid concentration in mol/L. v_acid_ml: Initial acid volume in mL. c_titrant: Titrant (strong base) concentration in mol/L. indicator: Optional {"name": "...", "ph_range": [low, high]}.

generate_species_distributionA

Draw the species distribution of an acid over pH (Henderson-Hasselbalch).

Plots the fraction α of every protonation species against pH with the pKa values marked — the standard diagram for absorption/distribution reasoning in pharmacy.

Use this when the user asks which species dominates at a given pH, about degree of ionization, or absorption across membranes. YOU supply pKa values (ascending) from your knowledge; pass species labels (formulas like "H₂PO₄⁻") for a readable legend.

Not this tool for: pH against added titrant volume, equivalence points or indicator choice (use generate_titration_curve). It answers "which species when", not "what pH do I have" — the pH of a solution or buffer, or the ionised fraction at one pH, as a number is calculate_ph.

Args: substance: Display name, e.g. "Phosphoric acid" (localizable). pka_values: pKa per protolysis step, ascending. labels: Optional species labels, most protonated first (len = len(pka_values) + 1).

compare_moleculesA

Compare 2-4 molecules side by side with their DIFFERENCES highlighted.

Computes the maximum common substructure (MCS): the shared scaffold stays neutral, everything outside it is highlighted — ideal for teaching drug classes ("what distinguishes ibuprofen from naproxen?"), homologous series or derivatives.

Use this when the user wants to compare structures, see differences between compounds, or study a drug class.

Reach for it in conversation too, not only on request: the word "difference" in a question about two substances is the trigger. Answering "what distinguishes ibuprofen from naproxen?" in prose leaves the reader to find the difference in two separate pictures — this figure marks it.

Not this tool for: a single structure (generate_molecule), or several structures that are merely to be drawn rather than contrasted (batch_generate).

Args: structures: 2-4 English/IUPAC names or SMILES strings. labels: Optional display names under each panel (localizable). title: Optional heading for the comparison (localizable).

generate_3dA

Generate a 3D conformer shown as an interactive, rotatable model.

Embeds the molecule in 3D (ETKDGv3 + force-field optimization, explicit hydrogens) and opens a drag-to-rotate ball-and-stick viewer in the chat panel. Also writes an SDF file for molecular modelling tools.

Use this when the user asks about 3D structure, molecular geometry (tetrahedral, planar...), conformation or spatial arrangement.

Not this tool for: a flat 2D structure drawing or a Fischer/Haworth projection — use generate_molecule.

IMPORTANT: Pass English/IUPAC names or SMILES; use label for the localized display name.

Args: name_or_smiles: English/IUPAC compound name or SMILES string. label: Optional display name (localizable).

calculate_phA

Calculate pH, buffer composition and buffer recipes, with the working.

Solves the exact charge balance — the same one that draws the titration curve — and puts the textbook approximation next to it. Where the two disagree, the approximation has lost its assumptions and the answer says so instead of quietly being wrong.

Pick the topic: "weak_acid", "weak_base", "strong_acid", "strong_base", "buffer" (ratio and capacity), "buffer_recipe" (masses to weigh) or "ionisation" (charged and uncharged fraction of a drug at one pH). You supply the pKa values from the monograph or table.

Not this tool for: drawing pH against titrant volume, equivalence points or indicator choice (use generate_titration_curve), or drawing the species fractions across the whole pH range (use generate_species_distribution) — this one computes, those draw.

Args: topic: Which case to solve. concentration: Concentration in mol/L. pka: pKa of the acid, or of the conjugate acid of a base. pkb: pKb of the base. pka_values: All pKa values of a polyprotic acid, in order. acid_concentration: [HA] in mol/L. base_concentration: [A⁻] in mol/L. target_ph: Wanted pH ("buffer_recipe") or medium pH ("ionisation"). total_concentration: [HA] + [A⁻] in mol/L. volume_ml: Buffer volume in mL. acid_molar_mass: Acid component, g/mol. base_molar_mass: Base component, g/mol. drug_type: "acid" or "base" ("ionisation").

predict_spectrumA

Say what a spectrum of this structure should show — or read a band.

Three questions, all of them exam material:

  • "ir_bands": which IR bands to expect for a structure, with range, intensity and band shape, ordered as you read a spectrum (high wavenumber first). Needs structure.

  • "assign_wavenumber": you measured a band — which groups absorb there? Ordered by how centrally the value sits in each range. Needs wavenumber in cm⁻¹.

  • "nmr_signals": how many ¹H signals the structure gives and in what integral ratio. Needs structure.

Deterministic on purpose, and therefore honestly limited: band positions come from a curated table matched to the structure, signals from the topological equivalence of the protons. It does NOT predict chemical shifts in ppm — that would take a model and would be guesswork.

The band list is ready to hand to generate_spectrum if a drawing is wanted; this tool only says what to expect.

Not this tool for: drawing a spectrum from peaks you already have (generate_spectrum), or looking up measured data for a substance (lookup).

Args: topic: Which question to answer — see the list above. structure: English/IUPAC name or SMILES of the compound ("ir_bands", "nmr_signals"). wavenumber: Measured band position in cm⁻¹ ("assign_wavenumber").

lookupA

Fetch a specific fact or value about a compound as plain text.

Use it when the request asks for a named piece of data — pick the topic:

  • "properties" (default): formula, molecular weight, CAS number, IUPAC name, LogP, InChIKey (PubChem).

  • "safety": GHS hazards — H/P statements, pictograms, signal word. For lab protocols and risk assessments.

  • "physical": experimental melting point, boiling point, density, solubility.

  • "biochem": compound class and biological role (ChEBI), related enzymes and proteins (UniProt).

  • "pathway": metabolic pathways the compound appears in (KEGG).

Not this tool for: a bare compound name with no named value asked for — that means show the substance, use generate_molecule. Nor for a visual data sheet with the structure beside the facts — use lookup_molecule_data. Nor for the IR bands or ¹H signals a structure should give — derived from the structure, not looked up — use predict_spectrum. This tool draws nothing; it returns text.

IMPORTANT: Always pass English or IUPAC compound names, never localized names — 'Aspirin' not 'Acetylsalicylsäure', 'Caffeine' not 'Coffein'.

Args: name: English/IUPAC compound name (e.g. 'Aspirin', 'Histidine'). topic: Which facts to fetch — see the list above.

lookup_molecule_dataA

Show a compound's data sheet: structure, PubChem properties and GHS safety.

Use it for a data sheet or facts available from those sources. The molecule panel also calls this tool when the user clicks Data. Internet access is required. Missing values are not evidence that a property or hazard is absent.

Not this tool for: a bare compound name with no data requested — use generate_molecule; one named value as text, or physical constants, biological role or metabolic pathways — use lookup. Pass English or IUPAC names, or SMILES.

Args: name: English/IUPAC compound name or SMILES (e.g. 'Aspirin').

generate_reactionA

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.

batch_generateA

Draw several individual compounds as separate PNG/SVG files and panels.

Failed names are reported in failed while successful structures are returned. Pass English or IUPAC names, or SMILES.

Not this tool for: one compound (use generate_molecule), structural differences (use compare_molecules), or a reaction scheme (use generate_reaction).

Args: molecules: List of English/IUPAC compound names or SMILES strings. formats: Output file formats, any of "png", "svg", "cdxml" (default: ["png", "svg"]). Include "cdxml" ONLY when the user wants to edit the structures in ChemDraw. abbreviate_groups: Set True to draw common substituents as short labels (Ph, Bn, OAc, OMe, CO2H, tBu, Boc, Ts …) instead of full skeletons. Applies to every molecule in the batch, so a series of structures stays visually consistent. render_style: Named look applied to every molecule in the batch. Empty = standard style. "compact" for small printed figures, "presentation" for slides, "grayscale" for grayscale printing.

generate_mechanismA

Show a reaction mechanism step by step with curved arrows, drawn with the user's own substrates.

Three mechanism families, each with a stated limit: SN2 — a methyl, primary or secondary alkyl chloride, bromide or iodide with one anionic nucleophile (OH⁻, CN⁻, I⁻, Br⁻, RO⁻, N₃⁻, RS⁻/HS⁻); a stereocentre is inverted. SN1 — a tertiary or benzylic alkyl halide with water, an alcohol or one of those anions; an allylic halide is refused (two products). Fischer esterification — one carboxylic acid with one primary or secondary alcohol. Substrates outside the limit return an error that names the reason. Without substrates, or if the drawing fails, the textbook example is shown and the result says so (substrates_drawn, fallback_reason).

Use this when the user asks about one of these mechanisms, electron-flow arrows, or wants to see how such a reaction proceeds step by step.

A question that starts "why does …" or "I don't understand why …" about a mechanism is the same request in disguise ("why does SN2 invert the centre?"). The arrows ARE the explanation; draw them and explain alongside, rather than describing them in words.

Not this tool for: the net equation educt → product without intermediates — that is generate_reaction. Only the mechanism types listed in reaction_type exist; for anything else use generate_reaction.

Args: reaction_type: "sn2", "sn1" or "fischer_ester". substrates: The user's substrates (names or SMILES): halide and nucleophile, or acid and alcohol. current_step: 0 = overview (all steps), 1-N = specific step.

save_pngA

Internal helper for the panel UI — never call this directly.

The panel's export button calls it when the image clipboard is blocked by the sandbox; saving a picture is the user's click, not yours. The generate_* tools already write their PNG and SVG files themselves.

Expects a base64 PNG (with or without a data:image/png;base64, prefix) and returns the path it was written to.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
chem_app_uiServe the MCP App UI (single-page React app).

TDQS

A4.5/5.0

Scored across 16 tools

Disambiguation5/5

Every tool carries an explicit 'Not this tool for' section that routes the adjacent cases (generate_molecule vs batch_generate vs compare_molecules, lookup vs lookup_molecule_data, predict_spectrum vs generate_spectrum, titration_curve vs species_distribution vs calculate_ph). The closest pairs (lookup/lookup_molecule_data, calculate_ph/generate_titration_curve) are separated by a clear 'text fact vs drawn figure' rule. The only non-agent-facing tool, save_png, is explicitly marked 'never call this directly'.

Naming Consistency4/5

The set is overwhelmingly consistent snake_case verb_noun: generate_molecule, generate_reaction, generate_spectrum, compare_molecules, predict_spectrum, calculate_ph, export_anki_deck. Minor deviations are batch_generate (noun_verb order, inverted relative to the other generate_* tools) and the bare verb lookup, which lacks a noun object while its sibling is lookup_molecule_data.

Tool Count4/5

Sixteen tools is slightly above the comfortable band, but the domain genuinely spans structure drawing, reaction schemes, mechanisms, spectra, TLC, 3D, acid-base calculations and data lookup, so each tool maps to a real task. The count is inflated by one internal helper (save_png) that agents should never call, which is the only clearly non-earning entry.

Completeness4/5

The surface covers the full drawing lifecycle: single, batch, comparison, 3D, reactions, mechanisms, spectra (draw and predict), TLC, three acid-base calculators, data lookup and Anki export — a wide, coherent workflow. Gaps are acknowledged rather than hidden: mechanisms exist only for SN1/SN2/Fischer esterification, and there is no SMILES-to-name conversion or reaction prediction, but agents can route those to generate_reaction or lookup.

Maintenance

ActivityActive
ResponsivenessNo recent community issues