Skip to main content
Glama

Molar mass

molar_mass
Read-only

Parse a chemical formula to calculate molar mass in g/mol and the mass each element contributes, including brackets and hydrates.

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.

Input Schema

NameRequiredDescriptionDefault
formulaYesChemical formula like H2O, Ca(OH)2 or CuSO4.5H2O. Write each element with a capital first letter.

Output Schema

NameRequiredDescriptionDefault
massYes
breakdownYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered; the description adds useful behavioral context by disclosing what the response contains (total g/mol plus per-element contributions) and which formula syntaxes are supported. It does not say what happens with an unparseable formula, which is the main remaining gap.

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?

Two sentences, zero filler, with the core action and output stated first and the syntax support second. Nothing here could be cut without losing 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?

For a one-parameter read-only computation with an output schema already defined, the description covers purpose, output shape, and input syntax adequately. The absence of error/edge-case guidance (invalid formula, unknown element) is the only meaningful omission.

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 single `formula` parameter is fully documented with examples and the capital-first-letter rule. The description's mention of brackets and hydrates largely duplicates the schema's own examples, so it adds little beyond the structured field. Baseline 3 is appropriate.

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

Purpose4/5

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

The description states a concrete verb+resource pair ("Parse a chemical formula and return the molar mass in g/mol") and even names the secondary output (per-element mass contributions). That is far more specific than the title restatement. It stops short of naming a sibling to differentiate from, so an agent must infer on its own that balance_equation or stoichiometry is the right tool for reactions.

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

Usage Guidelines3/5

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

"Handles brackets and hydrates like CuSO4.5H2O" implies the input scope this tool accepts, but there is no statement of when to choose this over stoichiometry or balance_equation. Usage is only implied by the tool's domain, not explained.

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