calculate_molar_mass
Use this when you have a chemical formula and need its molar mass (molecular weight), the number of atoms of each element, or its elemental mass-percent composition. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery. Do not us...
This record as markdown: /tools/com-tttkmbb-calcgrid/calculate-molar-mass.md
What calculate_molar_mass does on Calcgrid
AI agents call calculate_molar_mass to retrieve information from Calcgrid without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
formula | string | Yes | Chemical formula with case-sensitive element symbols, integer subscripts, brackets and optional hydrate dot, e.g. C6H12O6, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O. A tra |
Parameters from the server's own tool schema.
Why calculate_molar_mass is rated Low
Even though calculate_molar_mass only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Attacks that exploit this kind of access
The rule that runs calculate_molar_mass safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Calcgrid, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For calculate_molar_mass, this is the rule to start with:
calculate_molar_mass is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Calcgrid, apply this rule, and every calculate_molar_mass call is checked against it from then on.
Questions about calculate_molar_mass
Use this when you have a chemical formula and need its molar mass (molecular weight), the number of atoms of each element, or its elemental mass-percent composition. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery. Do not use this when you already know the molar mass and want to convert between grams and moles (use moles-mass) or need a solution concentration (use molarity). What it computes: Parses a chemical formula (including brackets, nested groups and hydrates) and sums IUPAC 2021 standard atomic weights to give the molar mass in g/mol, plus the atom count and mass-percent composition of each element. Inputs: formula (string). Complete JSON argument examples: {"formula":"C6H12O6"} | {"formula":"CuSO4·5H2O"} Outputs: molar_mass_g_mol [g/mol], molecular_mass_da [Da], atom_count, element_count, composition. Formula: molar_mass = Σ (atomic_weight_i × count_i); mass_fraction_percent_i = 100 × atomic_weight_i × count_i / molar_mass Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/molar-mass with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/chemistry/molar-mass.md. It is categorised as a Read tool in the Calcgrid MCP Server, which means it retrieves data without modifying state.
calculate_molar_mass accepts 1 parameter: formula. Required: formula. The full parameter table on this page comes from the server's own tool schema.
Register the Calcgrid MCP server in PolicyLayer and add a rule for calculate_molar_mass: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Calcgrid. Nothing to install.
calculate_molar_mass is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the calculate_molar_mass rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for calculate_molar_mass. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
calculate_molar_mass is provided by the Calcgrid MCP server (https://tttkmbb.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Calcgrid, and thousands of servers like it.
This server
Across the catalogue