Empirical formula
empirical_formulaCalculate the simplest whole-number chemical formula from each element's mass or percent composition.
Instructions
Find the simplest whole number formula from mass composition. Pass each element's mass or its percent of the total.
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": {
"composition": "<composition>"
},
"name": "empirical_formula"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Whether the numbers are percentages or masses. Defaults to percent. | |
| composition | Yes | Each element's mass or its percent of the total, like {C: 40.0, H: 6.7, O: 53.3}. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| counts | Yes | ||
| formula | Yes |