Skip to main content
Glama
kelseyee

Calculator MCP

by kelseyee

add

Add two numbers together using this calculator tool. Enter values for A and B to perform floating-point addition and get the sum.

Instructions

执行浮点数加法运算

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'add' tool, which performs floating-point addition of two numbers.
    def add(a: float, b: float) -> float:
        """执行浮点数加法运算"""
        return a + b
  • calculator.py:7-7 (registration)
    Registers the 'add' function as an MCP tool using the @mcp.tool() decorator.
    @mcp.tool()
  • Type hints and docstring define the input schema: two float parameters 'a' and 'b', returning a float.
    def add(a: float, b: float) -> float:
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states the operation type (floating-point addition) without mentioning error handling (e.g., overflow), precision limits, performance characteristics, or return format. For a computational tool with zero annotation coverage, this is insufficient behavioral context.

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 a single, efficient sentence in Chinese that directly states the tool's function with zero wasted words. It's appropriately sized for a simple arithmetic tool and front-loads the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (basic arithmetic), 2 parameters, no annotations, but with an output schema present, the description is minimally complete. It states the operation type but lacks behavioral details and parameter context. The output schema reduces the need to explain return values, but more guidance would be helpful for a tool in a set of mathematical operations.

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 description coverage is 0%, so the schema provides no parameter descriptions. The tool description doesn't mention parameters at all, failing to compensate for the coverage gap. However, with only 2 simple parameters (a, b) and an output schema present, the baseline is 3 as the schema defines the structure adequately for this basic operation.

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 '执行浮点数加法运算' (perform floating-point addition operation) clearly states the verb 'addition' and resource 'floating-point numbers'. It distinguishes from siblings like subtract, multiply, and divide by specifying addition, though it doesn't explicitly contrast with them. The purpose is specific and unambiguous.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like subtract or multiply. It states what the tool does but offers no context about appropriate use cases, prerequisites, or comparisons to sibling tools. This leaves the agent without usage direction beyond the basic operation.

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/kelseyee/mcp_calculator'

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