Skip to main content
Glama
xiaoyuchenhot

MCP Multi-Tool Server

add

Add two numbers together to calculate their sum. This tool performs basic addition by taking two numeric inputs and returning the total result.

Instructions

Add two numbers together.

Args:
    a: The first number
    b: The second number

Returns:
    The sum of a and b

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:26-38 (handler)
    The handler function for the 'add' tool, decorated with @mcp.tool() which also serves as registration. It takes two float arguments, adds them, and returns the sum. The docstring provides the schema description.
    @mcp.tool()
    def add(a: float, b: float) -> float:
        """
        Add two numbers together.
        
        Args:
            a: The first number
            b: The second number
        
        Returns:
            The sum of a and b
        """
        return a + b
Behavior2/5

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

No annotations are provided, so the description carries full burden. While it mentions the basic operation, it doesn't disclose behavioral traits like error handling (e.g., for non-numeric inputs), performance characteristics, or any constraints. The description is minimal and lacks depth beyond the core functionality.

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 extremely concise and well-structured with clear sections for Args and Returns. Every sentence earns its place by directly explaining the tool's purpose, parameters, and output without any unnecessary information.

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

Completeness4/5

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

Given the tool's low complexity (simple arithmetic), no annotations, and the presence of an output schema (which handles return values), the description is reasonably complete. It covers purpose, parameters, and return value adequately, though it could benefit from more behavioral context.

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?

The description adds meaningful semantics beyond the input schema, which has 0% description coverage. It explicitly defines 'a' as 'The first number' and 'b' as 'The second number', providing clear human-readable explanations that the schema lacks. This compensates well for the low schema coverage.

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

Purpose4/5

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

The description clearly states 'Add two numbers together' which is a specific verb+resource combination. It distinguishes from siblings like subtract, multiply, and divide by specifying the addition operation, though it doesn't explicitly contrast with all siblings.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like subtract, multiply, or divide. It simply states what the tool does without any context about appropriate use cases or comparisons to 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/xiaoyuchenhot/MCP-example'

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