Percent composition
percent_compositionCalculate the mass percentage of each element in a chemical formula and return the molar mass, so you can determine elemental composition from a formula such as H2O or Ca(OH)2.
Instructions
Find the percent by mass of each element in a chemical formula, along with the molar mass. This is the reverse of empirical_formula.
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": "percent_composition"
}
}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 | ||
| elements | Yes |