Skip to main content
Glama

core.calc

Read-onlyIdempotent

Evaluate math expressions safely via AST parsing with decimal precision, variables, functions, and constants, returning configurable-digit results and rejecting comparisons or attribute access.

Instructions

AST 기반 안전 수식 평가기. expression 은 사칙, %, //, **, 괄호, 함수(sqrt, abs, floor, ceil, round, log, ln, exp, 삼각함수 등), 상수(pi, e, tau)를 쓸 수 있고 variables 는 Decimal 문자열 전용이다. 결과는 precision(기본 50)자리 십진 문자열이다. 비교, 조건식, 속성 접근은 거부한다. 세금, 금융 공식은 전용 도구를 쓴다.

Input Schema

NameRequiredDescriptionDefault
precisionNo
variablesNo
expressionYes
trace_levelNosummary

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceNo계산 근거(tool, formula, inputs, steps, output)
resultYes
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior4/5

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

With readOnlyHint/idempotentHint already declaring the safety profile, the description adds genuine behavior: the accepted operator/function/constant set, the hard rejection of comparisons and attribute access, and that variables must be Decimal strings. It omits any mention of trace_level, whose effect on the response is left unexplained.

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?

Four dense sentences, each carrying distinct information (capability, input types, output format, exclusions), with the core purpose front-loaded. No filler.

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?

Output schema exists, so return values need no prose; the description still usefully states the result is a precision-digit decimal string. The only gap is trace_level, an unannotated parameter with no explanation anywhere.

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 description coverage is 0%, so the description must compensate; it does so for three of four parameters — expression (allowed operators, functions, constants), variables (Decimal strings only), and precision (default 50, digits of the decimal-string result). trace_level receives no semantics at all.

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 the mechanism (AST-based safe expression evaluator) and the resource (arithmetic expressions), which cleanly separates it from core.add/core.mul/core.div and from the domain-specific formulas in finance.*/tax.*. The added note that comparisons, conditionals and attribute access are refused further pins down the boundary.

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?

Explicitly states what is rejected (comparisons, conditional expressions, attribute access) and routes the agent elsewhere for tax/financial formulas ('use the dedicated tools'). That is both a when-not and an alternative pointer, so nothing is left to inference.

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

Deploy Server

Other Tools