Skip to main content
Glama
kelseyee

Calculator MCP

by kelseyee

divide

Perform floating-point division calculations by entering a dividend and non-zero divisor to compute accurate quotients for mathematical problems.

Instructions

执行浮点数除法运算 Args: b: 除数(必须非零)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • The handler function for the 'divide' tool, decorated with @mcp.tool() for registration. It performs floating-point division with a check for division by zero.
    @mcp.tool() def divide(a: float, b: float) -> float: """执行浮点数除法运算 Args: b: 除数(必须非零) """ if b == 0: raise ValueError("除数不能为零") return a / b
  • calculator.py:22-22 (registration)
    Registration of the divide tool using the @mcp.tool() decorator.
    @mcp.tool()
  • Input schema defined by type hints (a: float, b: float) and output float, with docstring describing parameters.
    def divide(a: float, b: float) -> float: """执行浮点数除法运算 Args: b: 除数(必须非零) """
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