Skip to main content
Glama

Balance Equation

balance_equation

化学方程式配平:输入未配平的化学方程式(反应物=生成物,用 = 或 → 连接,物质间用 + 连接),自动用线性代数(齐次线性方程组整数解)求出最简整数系数,返回配平后的方程式、各物质系数与原子守恒校验。示例:"Fe+O2=Fe3O4"、"C2H6+O2=CO2+H2O"、"KMnO4=K2MnO4+MnO2+O2"、"Cu+HNO3=Cu(NO3)2+NO+H2O"。支持括号(如 Ca(OH)2、Fe2(SO4)3)。注意:仅支持分子反应方程式,不支持离子方程式与电极反应。

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": "balance_equation"
  }
}

Input Schema

NameRequiredDescriptionDefault
equationYes化学方程式字符串,如 "Fe+O2=Fe3O4"、"C2H6+O2=CO2+H2O"

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses the solving method (homogeneous linear system, minimal integer coefficients) and what is returned (balanced equation, per-species coefficients, conservation check). The main gap is failure behavior – it doesn't say what happens when an equation cannot be balanced or contains an invalid element, which matters for a mutation-free but error-prone parser.

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?

Purpose is front-loaded, then format rules, examples, and the scope caveat at the end. The four worked examples partially duplicate the schema's examples but serve to disambiguate the accepted syntax; nothing is truly wasted, though it could be tightened slightly.

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?

An output schema exists, so return values needn't be re-explained, and the description still summarizes them helpfully. Combined with coverage of input grammar and scope limits, it is nearly complete for a one-parameter tool; only error/edge-case behavior (impossible or invalid equations) is unaddressed.

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

Parameters4/5

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

Schema coverage is 100% and the single parameter is already documented with examples, so the baseline would be 3. The description goes further by spelling out the grammar (separator '=' or '→', '+' between species, parenthesized groups like Ca(OH)2) which the schema does not mention, adding genuine meaning.

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 opens with a specific verb and resource ('化学方程式配平') and immediately pins down the domain: molecular-only balancing with balanced output, coefficients, and atom conservation check. It never names or distinguishes itself from siblings like chemistry_calc or math_solve, which is the only thing keeping it from a 5.

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?

It states the input form (reactants=products with = or →, '+' between species), gives concrete examples, and explicitly excludes ionic and electrode equations. That is a clear when-not condition, though it doesn't route the agent to any alternative tool for those excluded cases.

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