Skip to main content
Glama
soriat

MCP Elicitations Demo Server

by soriat

add

Adds two numbers interactively using the MCP Elicitations Demo Server. Input two numeric values to calculate their sum dynamically.

Instructions

Adds two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst number
bYesSecond number

Implementation Reference

  • The async handler function for the 'add' tool. It validates the input arguments using AddSchema, computes the sum of 'a' and 'b', and returns a structured text response containing the result.
    handler: async (args: any) => {
      const validatedArgs = AddSchema.parse(args);
      const sum = validatedArgs.a + validatedArgs.b;
      return {
        content: [
          {
            type: "text" as const,
            text: `The sum of ${validatedArgs.a} and ${validatedArgs.b} is ${sum}.`,
          },
        ],
      };
    },
  • Zod schema (AddSchema) defining the input structure for the 'add' tool: two number fields 'a' and 'b' with descriptions.
    const AddSchema = z.object({
      a: z.number().describe("First number"),
      b: z.number().describe("Second number"),
    });
  • Registration of the 'add' tool by including 'addTool' in the 'allTools' array, which is used by getTools() for listing tools and getToolHandler() for execution dispatching.
    const allTools = [
      echoTool,
      addTool,
      longRunningOperationTool,
      printEnvTool,
      sampleLlmTool,
      sampleWithPreferencesTool,
      sampleMultimodalTool,
      sampleConversationTool,
      sampleAdvancedTool,
      getTinyImageTool,
      annotatedMessageTool,
      getResourceReferenceTool,
      elicitationTool,
      getResourceLinksTool,
    ];
  • src/tools/index.ts:8-8 (registration)
    Import statement that brings the 'addTool' into the index module for registration.
    import { addTool } from "./tool-add.js";
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 for behavioral disclosure. 'Adds two numbers' implies a simple calculation but reveals nothing about error handling (e.g., overflow, invalid inputs), performance characteristics, or what the output looks like. For a tool with zero annotation coverage, this is insufficient behavioral context.

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 maximally concise with just three words that directly convey the core functionality. There is zero wasted language, and the information is front-loaded appropriately for such a simple tool.

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 simplicity (basic arithmetic operation with 2 parameters) and 100% schema coverage, the description is minimally complete. However, the lack of output schema means the description should ideally mention what is returned (e.g., a sum), but doesn't. The absence of annotations also leaves behavioral gaps unaddressed.

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 both parameters clearly documented as 'First number' and 'Second number'. The description adds no additional parameter semantics beyond what the schema already provides. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even without parameter info in the description.

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 verb ('Adds') and resource ('two numbers'), making the purpose immediately understandable. It doesn't differentiate from siblings, but since none of the sibling tools appear to be arithmetic operations, this is adequate. The description avoids tautology by specifying what is being added.

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. It doesn't mention any prerequisites, constraints, or suggest other tools for different mathematical operations. While the sibling list doesn't include obvious alternatives like 'subtract' or 'multiply', the lack of any usage context leaves the agent without guidance.

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

Related Tools

  • @kylekanouse/Test-MCP---DEMO-MCP-Dev-1
  • @wrtnlabs/calculator-mcp
  • @zhangzhefang-github/mcp-add-server
  • @dynstat/mcp-demo
  • @wudongjie/example-mcp-server
  • @YuheiNakasaka/arithmetic-mcp-server

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/soriat/soria-mcp'

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