Skip to main content
Glama

eval_formula

Read-only

Deterministically evaluate numeric formulas with variables, powers, parentheses, and arithmetic, including Chinese variable names. Verify anchor formulas and get exact computed results instead of estimates.

Instructions

确定性求值数值公式(四则/幂/括号/变量,支持中文变量名)。用于验证锚点公式、快速算数——数值永远由引擎算而非估算。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variablesNo变量取值,如 {等级: 60}
expressionYes公式,如 100 * 1.08 ^ (等级 - 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds meaningful behavioral context: evaluation is deterministic and values are always computed by the engine rather than estimated, which tells the agent the result is exact and reproducible.

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 concise clauses, front-loads the core function, and every sentence adds useful information. There is no filler or repetition of schema details.

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 two-parameter formula evaluator with full schema coverage, the description is largely complete: it covers supported syntax, variable-name language, determinism, and intended use. It does not discuss error behavior or the exact return shape, but the numeric-result nature is strongly implied by '数值永远由引擎算而非估算'.

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%, so the baseline is 3, but the description adds beyond the schema by specifying the supported formula grammar (four arithmetic operations, powers, parentheses) and explicitly confirming Chinese variable names are allowed. This helps the agent construct valid expressions.

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 states a specific verb ('求值') and resource ('数值公式'), and enumerates supported constructs (四则/幂/括号/变量) including Chinese variable names. It also names concrete uses—verifying anchor formulas and quick arithmetic—so an agent can distinguish it from sibling calculation/simulation tools.

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 explicitly says when to use the tool: for verifying anchor formulas and quick arithmetic. It does not explicitly name alternatives or exclusion criteria, but the clear use-case framing gives enough context for an agent to select it among formula-related siblings.

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