Skip to main content
Glama

division

Perform precise division calculations by entering a numerator and denominator. The tool outputs the result accurately, aiding in mathematical problem-solving tasks.

Instructions

Divides the first number by the second number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
denominatorYesThe number to divide by (denominator)
numeratorYesThe number being divided (numerator)

Implementation Reference

  • src/index.ts:80-92 (registration)
    Registers the 'division' MCP tool with input schema (numerator, denominator), description, and an async handler that calls Arithmetic.division and returns the result as text content.
    mathServer.tool("division", "Divides the first number by the second number", { numerator: z.number().describe("The number being divided (numerator)"), denominator: z.number().describe("The number to divide by (denominator)") }, async ({ numerator, denominator }) => { const value = Arithmetic.division(numerator, denominator) return { content: [{ type: "text", text: `${value}` }] } })
  • Zod schema defining input parameters for the 'division' tool: numerator and denominator as numbers.
    numerator: z.number().describe("The number being divided (numerator)"), denominator: z.number().describe("The number to divide by (denominator)")
  • MCP tool handler function for 'division': invokes Arithmetic.division and formats the result as MCP response content.
    }, async ({ numerator, denominator }) => { const value = Arithmetic.division(numerator, denominator) return { content: [{ type: "text", text: `${value}` }] }
  • Static helper method in Arithmetic class that performs the actual division operation (numerator / denominator).
    static division(numerator: number, denominator: number) { const quotient = numerator / denominator return quotient }

Other Tools

Related Tools

  • @kelseyee/mcp_calculator
  • @githubpradeep/calc-mcp72
  • @parameshwaran1/mcpserverexample
  • @avanishd-3/math-mcp
  • @githejie/mcp-server-calculator
  • @wrtnlabs/calculator-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/EthanHenrickson/math-mcp'

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