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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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
        """
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses the basic behavior (addition operation) and return value, but lacks details on error handling, integer overflow behavior, or performance characteristics that would be useful for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly structured and front-loaded with the core purpose, followed by clear sections for arguments and return value. Every sentence earns its place with zero wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (basic arithmetic operation), 2 parameters, and the presence of an output schema that handles return values, the description is complete enough for an agent to understand and use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides clear semantic meaning for both parameters ('First integer', 'Second integer') beyond what the bare schema offers, though it doesn't specify constraints like range or special values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Add') and resource ('two integers together'), clearly distinguishing this tool from its siblings (divide, multiply, subtract) by specifying the exact mathematical operation performed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('Add two integers together') and implicitly distinguishes it from alternatives by naming the operation, making it clear this is for addition versus division, multiplication, or subtraction provided by sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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