Skip to main content
Glama
dolphinsboy

Test FastMCP

by dolphinsboy

add

Calculate the sum of two integers by providing both numbers as input parameters to perform basic addition.

Instructions

Add two integers together.

Args: a: First integer b: Second integer

Returns: The sum of a and b

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • main.py:6-16 (handler)
    The handler function that executes the 'add' tool logic. Takes two integers (a, b) as input and returns their sum. Type hints and docstring provide the schema for input/output validation.
    def add(a: int, b: int) -> int:
        """Add two integers together.
        
        Args:
            a: First integer
            b: Second integer
            
        Returns:
            The sum of a and b
        """
        return a + b
  • main.py:5-5 (registration)
    The @mcp.tool decorator registers the 'add' function as an MCP tool with the FastMCP server instance.
    @mcp.tool
  • main.py:6-15 (schema)
    Input/output schema defined through Python type hints (a: int, b: int -> int) and comprehensive docstring documenting the parameters and return value.
    def add(a: int, b: int) -> int:
        """Add two integers together.
        
        Args:
            a: First integer
            b: Second integer
            
        Returns:
            The sum of a and b
        """
Install Server

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/dolphinsboy/test-fast-mcp'

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