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
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | formula (default) computes the weight; smiles validates syntax only. | |
| smiles | No | A single SMILES string without a name, at most 200 characters (mode smiles). | |
| formula | No | Chemical 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. | |
| tolerance | No | Allowed absolute difference from claimedWeight in g/mol. Default 0.01. | |
| claimedWeight | No | Stated molar mass to check, g/mol. | |
| elementWeights | No | Caller-chosen weights; they take precedence over the table and are the only way to weigh elements without a standard atomic weight. |