Molar mass
molar_massParse a chemical formula to calculate molar mass in g/mol and each element's mass contribution, including brackets and hydrates such as CuSO4.5H2O.
Instructions
Parse a chemical formula and return the molar mass in g/mol with the mass each element adds. Handles brackets and hydrates like CuSO4.5H2O.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"formula": "<formula>"
},
"name": "molar_mass"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formula | Yes | Chemical formula like H2O, Ca(OH)2 or CuSO4.5H2O. Write each element with a capital first letter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mass | Yes | ||
| breakdown | Yes |