Skip to main content
Glama
minimind-org

MCP Server TypeScript Template

by minimind-org

addition

Calculate the sum of two numerical values by providing inputs a and b. Input values are validated against a defined schema for accurate results.

Instructions

Add two numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Implementation Reference

  • Core handler function that performs the addition of two numbers a and b.
    export function exampleAddition(params: z.infer<typeof AdditionSchema>) {
      return params.a + params.b;
    }
  • Zod schema defining the input parameters for the addition tool: two numbers a and b.
    export const AdditionSchema = z.object({
      a: z.number(),
      b: z.number(),
    });
  • index.ts:39-43 (registration)
    Tool registration in the ListTools response, specifying name, description, and input schema.
    {
      name: "addition",
      description: "Add two numbers",
      inputSchema: zodToJsonSchema(AdditionSchema),
    }
  • index.ts:62-68 (handler)
    Dispatch handler in CallToolRequestHandler that parses arguments, calls the exampleAddition function, and formats the response.
    case "addition": {
      const args = AdditionSchema.parse(request.params.arguments);
      const result = operation.exampleAddition(args);
      return {
        content: [{ type: "text", text: result.toString() }],
      };
    }
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 'Add' implies a computational operation, the description doesn't specify whether it's read-only, destructive, has rate limits, or what the output format might be. It lacks essential behavioral context for an agent.

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 'Add two numbers' is extremely concise and front-loaded, consisting of just three words that directly convey the core functionality. There's no wasted language, making it efficient and easy to parse.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what the tool returns, potential errors, or behavioral traits, leaving gaps that could hinder an agent's effective use despite the straightforward operation.

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 mentions 'two numbers', which aligns with the two parameters (a and b) in the schema. However, with 0% schema description coverage, the description doesn't add meaningful details about parameter roles, constraints, or examples beyond the basic count. It partially compensates but leaves parameters minimally documented.

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' clearly states the verb ('Add') and the resource ('two numbers'), making the purpose immediately understandable. It doesn't distinguish from the sibling tool 'example_operation', but the purpose is specific enough for this simple arithmetic operation.

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. There's no mention of prerequisites, limitations, or comparison with the sibling tool 'example_operation', leaving usage entirely implicit.

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

  • @joeguo911/mcp-demo
  • @Mtar786/mcpServer
  • @liaotaodcx8/toolkittest
  • @Joseph19820124/joseph_mcp_server
  • @riteshbangal/BuildMcpServer
  • @bahfahh/mcptest

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/minimind-org/mcp-server-typescript-template'

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