Skip to main content
Glama
ZureJack

demo-mcp-server

by ZureJack

calculate

Evaluate a simple arithmetic expression using operators +, -, *, /, (, ), ., %. Returns the result as a string, preventing code injection by disallowing variables or functions.

Instructions

对一个简单的算术表达式求值。

仅允许数字、空白以及 + - * / ( ) . % 运算符, 禁止任何变量、函数或属性访问,以避免代码注入。

Args: expression: 例如 "1 + 2 * (3 - 4)"

Returns: 表达式的字符串化结果。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the safety restrictions (preventing code injection) and the return type (stringified result), which is sufficient for a simple arithmetic evaluator.

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 extremely concise: a few sentences covering purpose, constraints, and parameter description with an example. No wasted words.

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?

The description covers the main functionality and parameter, but lacks information on error handling (e.g., invalid expressions, division by zero). However, given the simplicity and presence of an output schema, it is mostly complete.

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%, but the description compensates by explaining the 'expression' parameter as an arithmetic expression with an example, adding meaning beyond the schema's type definition.

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 clearly states the tool evaluates simple arithmetic expressions, lists allowed operators, and prohibits variables/functions to prevent injection. It distinguishes itself from sibling tools like add, echo, and system_info.

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?

The description specifies constraints (only allowed operators, no variables/functions) but does not explicitly state when to use this tool versus alternatives or provide prerequisites.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZureJack/demo-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server