Skip to main content
Glama

subtract

Calculate the difference between two numbers by subtracting one integer from another. Use this tool to perform basic arithmetic subtraction operations.

Instructions

Subtract two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • main.py:15-17 (handler)
    The handler function that implements the subtract tool logic by subtracting two integers.
    def subtract(a: int, b: int) -> int: """Subtract two numbers""" return a - b
  • main.py:14-14 (registration)
    Registers the subtract tool with the FastMCP instance using the @mcp.tool decorator.
    @mcp.tool
  • main.py:15-15 (schema)
    Type annotations defining the input schema (two ints) and output (int) for the subtract tool.
    def subtract(a: int, b: int) -> int:

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

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