Skip to main content
Glama
sakthigcp

MCP Server Example

by sakthigcp

add

Add two integers together to calculate their sum. Use this tool to perform basic addition operations within the MCP Server Example.

Instructions

Adds two numbers a and b and returns the result!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Registers the 'add' function as an MCP tool using the FastMCP decorator.
    @mcp.tool()
  • The handler function that implements the 'add' tool logic by adding two integers and returning the result.
    def add(a: int, b: int) -> int:
        """
        Adds two numbers a and b and returns the result!
        """
        return a + b
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the basic operation and return value, but doesn't cover important aspects like error conditions (e.g., overflow), performance characteristics, or any side effects. For a mathematical operation tool, this leaves significant behavioral gaps.

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 - a single sentence that communicates the core functionality efficiently. There's zero waste or redundancy, and the information is front-loaded with the essential purpose and outcome.

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 simplicity (basic arithmetic operation with 2 parameters) and the presence of an output schema (which handles return value documentation), the description is reasonably complete. It covers the essential purpose and outcome. However, it could benefit from mentioning that it performs integer addition specifically, since the schema shows integer parameters.

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 schema description coverage is 0%, so the description must compensate. It identifies the parameters as 'two numbers a and b' which provides basic semantics, but doesn't explain constraints, ranges, or the mathematical relationship beyond addition. The description adds some value but doesn't fully compensate for the schema coverage gap.

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 resources ('two numbers a and b'), and mentions the return value. It doesn't need to distinguish from siblings since there are none. However, it could be slightly more precise by specifying integer addition rather than generic 'numbers'.

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. While there are no sibling tools to differentiate from, it doesn't mention any context, prerequisites, or constraints for usage. The description simply states what it does without indicating appropriate scenarios.

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

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