Skip to main content
Glama

subtract

Calculate the difference between two numbers by subtracting the second value from the first. This mathematical operation tool provides accurate subtraction results for numeric inputs.

Instructions

Subtract the second number from the first number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • server.py:78-81 (handler)
    The subtract tool is implemented as a handler function using the @mcp.tool() decorator, which likely registers it with MCP. It takes two float arguments and returns their difference.
    @mcp.tool() def subtract(a: float, b: float) -> float: """Subtract the second number from the first number.""" return a - b

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/vipankumar87/MCP-Example'

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