Skip to main content
Glama
dolphinsboy

Test FastMCP

by dolphinsboy

multiply

Calculate the product of two integers. Multiply two numbers together to get their total result.

Instructions

Multiply two integers together.

Args: a: First integer b: Second integer

Returns: The product of a and b

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • main.py:31-42 (handler)
    The multiply tool handler implementation, decorated with @mcp.tool to register it as an MCP tool. Takes two integer parameters (a and b) and returns their product. The function includes comprehensive docstring documentation for the tool schema.
    @mcp.tool
    def multiply(a: int, b: int) -> int:
        """Multiply two integers together.
        
        Args:
            a: First integer
            b: Second integer
            
        Returns:
            The product of a and b
        """
        return a * b
  • main.py:31-42 (registration)
    Registration of the multiply tool using FastMCP's @mcp.tool decorator on line 31. This decorator automatically registers the function as an MCP tool with its schema derived from the function signature and docstring.
    @mcp.tool
    def multiply(a: int, b: int) -> int:
        """Multiply two integers together.
        
        Args:
            a: First integer
            b: Second integer
            
        Returns:
            The product of a and b
        """
        return a * b
  • main.py:32-41 (schema)
    Schema definition for the multiply tool: accepts two integer parameters (a and b) and returns an integer. The type hints and docstring define the input/output schema for MCP tool validation.
    def multiply(a: int, b: int) -> int:
        """Multiply two integers together.
        
        Args:
            a: First integer
            b: Second integer
            
        Returns:
            The product 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