Skip to main content
Glama

chem_balance

Read-only

Chemical equation balancer — Balance any chemical equation exactly (rational null-space solver, not guessing): ions with charges (Fe^3+, MnO4^-, e^-), brackets, hydrates (CuSO4.5H2O). Returns the balanced equation, integer coefficients, per-element atom check, molar masses and a mass-conservation check; flags equations that mix independent reactions. Param equation= (use -> or =; separate species with +). Price: $0.003 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": {
      "equation": "<equation>"
    },
    "name": "chem_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
equationYese.g. Fe2O3 + CO -> Fe + CO2

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered; the description adds substantial context beyond that. It discloses the return payload (balanced equation, integer coefficients, per-element atom check, molar masses, mass-conservation check), an edge-case flag for independent-reaction mixtures, and a payment requirement ($0.003 USDC on Base via x402) that an agent must know before calling. It stops short of describing failure behavior for invalid or impossible equations.

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?

Front-loaded with the core action and method, then return values, then parameter syntax, then price — a sensible order with no filler sentences. It is dense with parenthetical enumerations, which costs a little readability but each 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?

For a single-parameter tool with no output schema, the description covers what comes back, how input is formatted, cost, and one notable limitation. The remaining gap is error/edge-case behavior (unbalanceable or malformed equations), which matters because it promises to balance 'any' equation exactly.

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% for the single parameter, so the schema already documents 'equation'. The description does add syntax worth knowing ('use -> or =; separate species with +'), which is more than the schema's one example, but it does not clarify formatting edge cases such as state symbols or charge notation placement.

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?

Names a specific verb+resource ('Balance any chemical equation exactly') and specifies scope (ions with charges, brackets, hydrates), which separates it from siblings like chem_molar_mass or chem_compound. It also states the method (rational null-space solver, not guessing), so an agent knows this is deterministic rather than heuristic.

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?

Usage is implied by the description ('Balance any chemical equation'), but there is no explicit when-to-use/when-not guidance and no named alternative for related tasks such as molar mass or compound lookup. The note that equations mixing independent reactions are flagged is a useful boundary, but it describes an output behavior rather than routing guidance.

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