Skip to main content
Glama

WritersLogic verifiable AI agents

formula-weight

Formula weight from a chemical formula (Hill notation, IUPAC/CIAAW weights) — Parses a chemical formula (parentheses, brackets, hydrate dots such as CuSO4·5H2O, an ignored charge) for a chemist or an agent that must check a molar mass, and returns the Hill-notation formula, the formula weight in g/mol from the CIAAW abridged standard atomic weights summed exactly in decimal arithmetic, and mass fractions. Pass claimedWeight and tolerance to check a stated molar mass. Elemen

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": "formula-weight"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoformula (default) computes the weight; smiles validates syntax only.
smilesNoA single SMILES string without a name, at most 200 characters (mode smiles).
formulaNoChemical formula, at most 200 characters. Element symbols are case-sensitive (Co is cobalt, CO is carbon monoxide). Hydrate separators: . · • *. A trailing charge such as ^2+, 2- after a bracket, or a bare + or - is ignored.
toleranceNoAllowed absolute difference from claimedWeight in g/mol. Default 0.01.
claimedWeightNoStated molar mass to check, g/mol.
elementWeightsNoCaller-chosen weights; they take precedence over the table and are the only way to weigh elements without a standard atomic weight.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources