Skip to main content
Glama
kylekanouse

Demo MCP Server

by kylekanouse

Addition Tool

add

Calculate the sum of two numbers by providing both values as input parameters.

Instructions

Add two numbers together

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst number
bYesSecond number

Implementation Reference

  • The handler function for the 'add' tool that adds two input numbers and returns the result as text content.
    async ({ a, b }) => ({
      content: [
        {
          type: "text",
          text: `${a} + ${b} = ${a + b}`
        }
      ]
    })
  • Input schema, title, and description for the 'add' tool using Zod validation.
    {
      title: "Addition Tool",
      description: "Add two numbers together",
      inputSchema: {
        a: z.number().describe("First number"),
        b: z.number().describe("Second number")
      }
    },
  • Registration of the 'add' tool on the MCP server, including schema and inline handler function.
    server.registerTool(
      "add",
      {
        title: "Addition Tool",
        description: "Add two numbers together",
        inputSchema: {
          a: z.number().describe("First number"),
          b: z.number().describe("Second number")
        }
      },
      async ({ a, b }) => ({
        content: [
          {
            type: "text",
            text: `${a} + ${b} = ${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 the full burden of behavioral disclosure. 'Add two numbers together' implies a simple, deterministic operation but doesn't cover potential errors (e.g., overflow, invalid inputs), performance, or output format. For a tool with no annotations, this lacks detail on behavior beyond the basic action, warranting a 2.

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 a single, efficient sentence with zero waste: 'Add two numbers together'. It is front-loaded and appropriately sized for this simple tool, earning a 5 for conciseness.

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 (basic arithmetic), 100% schema coverage, and no output schema, the description is minimally complete. It states the core action but lacks details on usage, behavior, or output. For such a simple tool, this is adequate but with clear gaps, scoring a 3 as the minimum viable.

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?

Schema description coverage is 100%, with clear descriptions for parameters 'a' and 'b' as 'First number' and 'Second number'. The description 'Add two numbers together' aligns with this but adds no additional semantic context beyond what the schema provides. With high schema coverage, the baseline is 3, as the description doesn't enhance parameter understanding.

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 'Add two numbers together' clearly states the verb ('add') and resource ('two numbers'), making the purpose immediately understandable. It distinguishes from siblings like 'subtract' or 'multiply' by specifying addition, though it doesn't explicitly contrast them. The title 'Addition Tool' reinforces this, but the description itself is specific enough for a 4.

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' or 'multiply', nor does it mention any context or prerequisites. It simply states what the tool does, leaving the agent to infer usage based on the operation name alone. This is minimal guidance, scoring a 2.

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/kylekanouse/Test-MCP---DEMO-MCP-Dev-1'

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