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

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:
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