Skip to main content
Glama

chem_empirical_formula

Read-only

Empirical & molecular formula from composition — Find the empirical formula (and the molecular formula when molar_mass is given) from percent composition or measured element masses. Converts each value to moles with IUPAC conventional atomic weights, divides by the smallest, finds the smallest whole-number multiplier, and returns mole ratios, Hill-order and input-order formulas, empirical mass, back-calculated composition, a confidence flag and warnings (e.g. percentages not summing to 100). Params: percent=C:40.0,H:6.71,O:53.29 or mass= grams per element; optional molar_mass= g/mol. Offline, instant. Price: $0.002 USDC (Base, via x402).

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": {
      "percent": "<percent>"
    },
    "name": "chem_empirical_formula"
  }
}

Input Schema

NameRequiredDescriptionDefault
percentYese.g. C:40.0,H:6.71,O:53.29

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnly/destructive/openWorld hints; the description goes well beyond them with the actual procedure (IUPAC weights, convert to moles, divide by smallest, whole-number multiplier), the returned artifacts (mole ratios, Hill-order and input-order formulas, empirical mass, back-calculated composition, confidence flag, warnings), plus cost and latency. The only tension is "Offline, instant" against openWorldHint=true, but the computation itself is side-effect free and no destructive behavior is implied, so this is a minor wording conflict rather than a contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with the purpose, then method, returns, parameter syntax, and price — a sensible order with no filler sentences. It is dense (long em-dash clause enumerating outputs) and would read better as short bullets, but every element carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly takes on the burden of enumerating return values and even describes warning/confidence semantics, which is what an agent needs to interpret results. The gap is that the advertised inputs and the schema-provided inputs diverge, leaving the caller unsure whether a mass-based call is possible.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema's own example ("C:40.0,H:6.71,O:53.29") is repeated verbatim in the description, so little is added for the one documented parameter. More importantly, the description advertises a `mass=` input and an optional `molar_mass=` input that do not exist in the schema, which could lead an agent to attempt an unsupported call.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Find the empirical formula (and the molecular formula when molar_mass is given) from percent composition or measured element masses" gives a specific verb, resource, and input domain. It is clearly separable from computational siblings like chem_molar_mass (mass of a formula) or chem_balance (reaction balancing) without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states the triggering inputs (percent composition or measured element masses) and the condition that upgrades the result to a molecular formula (molar_mass given), which is clear when-to-use context. It stops short of naming alternatives or when-not-to-use cases (e.g. 'use chem_molar_mass if you already have a formula').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources