Skip to main content
Glama
v4lheru

generic-mcp-server

calculate-sum

Add two numbers together to get their total sum. This tool performs basic arithmetic addition for any numerical inputs.

Instructions

Calculates the sum of two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesThe first number
bYesThe second number

Implementation Reference

  • The handler function that executes the core logic of the 'calculate-sum' tool by adding the two input numbers and returning the result as text content.
    handler: async ({ a, b }: { a: number; b: number }) => {
        return {
            content: [
                {
                    type: "text" as const,
                    text: String(a + b),
                },
            ],
        };
    },
  • The Zod schema defining the input parameters 'a' and 'b' as numbers for the 'calculate-sum' tool.
    inputSchema: z.object({
        a: z.number().describe("The first number"),
        b: z.number().describe("The second number"),
    }),
  • src/tools.ts:4-20 (registration)
    The registration of the 'calculate-sum' tool within the exported TOOLS object, which is used by the MCP server's listTools and callTool handlers.
    "calculate-sum": {
        description: "Calculates the sum of two numbers",
        inputSchema: z.object({
            a: z.number().describe("The first number"),
            b: z.number().describe("The second number"),
        }),
        handler: async ({ a, b }: { a: number; b: number }) => {
            return {
                content: [
                    {
                        type: "text" as const,
                        text: String(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. While 'calculates' implies a read-only operation, the description doesn't address important behavioral aspects like error handling (e.g., overflow, invalid inputs), performance characteristics, or whether the operation has side effects. For a tool with zero annotation coverage, this represents a significant gap in 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 perfectly concise at just one sentence that directly states the tool's function. There's zero wasted language, no unnecessary elaboration, and the information is front-loaded effectively. Every word earns its place in this minimal but complete statement of purpose.

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 operation), 100% schema coverage, and no output schema, the description is minimally adequate. However, it lacks information about return values (though no output schema exists), error conditions, or limitations (e.g., numeric range constraints). For a basic calculation tool, this represents the minimum viable description but with clear gaps in completeness.

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 'a' and 'b' clearly documented as 'the first number' and 'the second number' respectively. The description adds no additional parameter semantics beyond what the schema already provides. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no parameter information 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 tool's purpose with a specific verb ('calculates') and resource ('sum of two numbers'). It distinguishes from the sibling tool 'get-weather' by focusing on mathematical calculation rather than weather data retrieval. However, it doesn't explicitly differentiate from potential mathematical sibling tools, which prevents a perfect score.

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. There's no mention of when-not-to-use scenarios or comparison with other calculation tools. The only implied usage is for summing two numbers, but this is basic and doesn't help an agent make informed decisions about tool selection.

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/v4lheru/generic-mcp-template'

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