Skip to main content
Glama
KrishnaPapana

MCP Server Deepdive

add_two_numbers

Calculate the sum of two numbers by providing both values as inputs to get the total result.

Instructions

Adds 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

Implementation Reference

  • The handler function for the 'add_two_numbers' tool, which adds two input numbers and returns their sum.
    def add_two_numbers(a, b):
        """
        Adds two numbers together.
        Args:
        a -- the first number
        b -- the second number
        Returns:
        The sum of a and b 
        """
        
        return a + b
  • The @mcp.tool() decorator registers the add_two_numbers function as an MCP tool.
    @mcp.tool()
  • Docstring providing the schema description for parameters 'a', 'b' and the return value.
    """
    Adds two numbers together.
    Args:
    a -- the first number
    b -- the second number
    Returns:
    The sum of a and b 
    """
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return value ('The sum of a and b'), which adds some context, but fails to address important aspects like error handling, input validation, or performance characteristics. For a tool with zero annotation coverage, this is insufficient.

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

Conciseness4/5

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

The description is appropriately sized and well-structured with clear sections for purpose, arguments, and returns. It uses minimal sentences that each serve a distinct purpose, though the formatting could be slightly more polished.

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

Completeness3/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) and lack of annotations or output schema, the description is moderately complete. It covers the basic purpose and parameters but misses details like error cases or input constraints, which would be helpful for an AI agent to use it correctly.

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

Parameters3/5

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

The description explicitly defines parameters 'a' and 'b' as 'the first number' and 'the second number', adding meaning beyond the input schema (which has 0% description coverage and only specifies types as strings). However, it does not clarify that the parameters are strings in the schema or explain how numeric addition works with string inputs, leaving some ambiguity.

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 the tool's purpose with a specific verb ('Adds') and resource ('two numbers together'), making it immediately understandable. However, since there are no sibling tools, it cannot demonstrate differentiation from alternatives, which prevents a perfect score of 5.

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 or in what context it should be applied. It simply states what the tool does without any usage instructions, prerequisites, or exclusions.

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/KrishnaPapana/mcpserverexample'

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