Skip to main content
Glama
yanglinfeng

Memory Bridge

by yanglinfeng

算术计算器

answer_calculator
Read-onlyIdempotent

Evaluate arithmetic expressions with + - * / % ^ and parentheses when recalled values need totals, unit price times quantity, or other calculations. Use it instead of mental math.

Instructions

对算术表达式做确定性求值,支持 + - * / % ^ 与括号。召回结果中的数值需要加减乘除(金额合计、单价×数量等)时调用,不要心算。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes算术表达式,如 "(1234.5 + 678.9) * 2"
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed world), so the bar is lower; the description still adds that evaluation is 确定性, which reinforces the idempotent contract in task terms. It stops short of stating error behavior or the length limit, so it is good but not exhaustive.

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, capability stated first, invocation condition second, zero filler. Every clause earns its place.

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 simple, fully annotated, closed-world utility the description is sufficient to invoke correctly. The only shortfall is that with no output schema, the return shape (number vs formatted string) is never indicated.

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 expression parameter already carries a worked example, so baseline is 3. The operator list in the description is complementary syntax information, but the ambiguity that matters most — whether ^ is exponentiation and % is modulo vs percent — is left unresolved in both schema and description.

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 (确定性求值) and resource (算术表达式), then enumerates the operator set (+ - * / % ^ 与括号), which cleanly distinguishes it from the date-oriented siblings answer_date_diff/answer_date_shift. An agent needs no schema inspection to know exactly what this does.

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

Usage Guidelines5/5

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

Gives an explicit trigger condition (when recalled values need 加减乘除, with concrete examples 金额合计、单价×数量) plus a negative instruction (不要心算) that steers the agent away from an inferior alternative behavior. This is exactly the when-to-use guidance the dimension asks for.

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