Skip to main content
Glama

molar-mass-calculator

Read-onlyIdempotent

Compute the molar mass (g/mol) of a chemical compound from its formula. Parses standard notation with element symbols, subscripts, nested parentheses, and hydrate dots. Returns the total molar mass and a per-element breakdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formulaYesChemical formula in standard notation. Element symbols use a capital letter optionally followed by one lowercase letter (Na, Cl, Fe). Subscripts are written as plain digits after the symbol or group (H2O, C6H12O6, Ca(OH)2). Parentheses group atoms with a shared subscript. Hydrate notation with a dot is supported (CuSO4·5H2O).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
formulaYesThe original input formula, unchanged.
breakdownYesPer-element breakdown in Hill order (C, H, then alphabetical). Each entry has the element symbol, total atom count in the formula, atomic weight (g/mol), and contribution to the total (count × atomicWeight).
molarMassYesMolar mass in grams per mole (g/mol).
normalizedYesThe input with whitespace stripped and unicode subscripts converted to ASCII digits.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds meaningful behavior beyond these: it parses standard notation including nested parentheses and hydrate dots, and returns both a total and per-element breakdown. This provides useful context without contradicting the annotations.

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

Conciseness5/5

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

The description is two sentences. The first sentence states the core function and output unit; the second explains parsing capabilities and return contents. Every phrase earns its place, with no wasted words or repetition of annotations.

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

Completeness5/5

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

For a single-parameter read-only calculator, the description is complete. It covers input syntax, supported notation variants, and output shape. Annotations (readOnly, idempotent, non-destructive) and an output schema exist, reducing the burden on the description to describe return values or safety. No critical gaps remain.

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 description coverage is 100%, so the schema fully documents the 'formula' parameter with examples and notation rules. The description's mention of 'nested parentheses' and 'hydrate dots' adds no new semantic value beyond what the schema already provides. Baseline 3 is correct when structured data carries the burden.

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?

The description opens with 'Compute the molar mass (g/mol) of a chemical compound from its formula,' using a specific verb and resource. It clearly distinguishes itself from the many sibling calculator tools by specifying the exact domain (molar mass) and the input type (chemical formula).

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 tool's scope and parsing capabilities, making it clear when it should be used. There is no explicit exclusion or naming of an alternative, but among the sibling tools, none offer molar mass calculation, so the usage context is unambiguous. A 4 is appropriate because guidance is implied rather than explicitly stated.

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