Skip to main content
Glama

subtract

Calculate the difference between two numbers by subtracting the second number from the first number to get the result.

Instructions

Subtract the second number from the first number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • server.py:78-81 (handler)
    The handler function for the 'subtract' MCP tool. It takes two float arguments, subtracts the second from the first, and returns the result. The @mcp.tool() decorator registers it as a tool.
    @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