Skip to main content
Glama

divide

Perform division of two integers by specifying values for 'a' and 'b'. Leverage the Example MCP Server's integration capabilities for seamless mathematical operations in supported IDEs.

Instructions

Divide two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • main.py:24-29 (handler)
    The handler function for the 'divide' MCP tool. It divides two integers 'a' by 'b', returns a float result, and raises a ValueError if b is zero. The schema is defined by type hints and docstring.
    @mcp.tool def divide(a: int, b: int) -> float: """Divide two numbers""" if b == 0: raise ValueError("Cannot divide by zero") return a / b

Other Tools

Related Tools

  • @YuheiNakasaka/arithmetic-mcp-server
  • @githubpradeep/calc-mcp71
  • @wrtnlabs/calculator-mcp
  • @riteshbangal/BuildMcpServer
  • @githubpradeep/calc-mcp72
  • @avanishd-3/math-mcp

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/Joseph19820124/joseph_mcp_server'

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