Skip to main content
Glama
MCP Server Boilerplate

MCP Server Boilerplate

by jeandbonicel

Calculator

calculator
Read-only

Performs basic arithmetic operations—addition, subtraction, multiplication, and division—on two numeric operands, enabling quick math calculations within the MCP workflow.

Instructions

Performs basic arithmetic operations: add, subtract, multiply, divide.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "operation": "<operation>",
      "a": "<a>",
      "b": "<b>"
    },
    "name": "calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesFirst operand
bYesSecond operand
operationYesThe operation to perform

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds no behavioral context beyond restating the operations already enumerated in the schema enum — nothing about divide-by-zero handling, integer vs. floating-point precision, or return format for a mutation-free but numerically sensitive function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence with no filler or redundancy. It is appropriately sized for a trivial tool, though the colon-list format duplicates information the schema already carries.

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?

For a simple three-parameter pure function with full schema coverage and read-only annotations, the description is adequate to call the tool correctly. It leaves minor but real gaps unaddressed, notably divide-by-zero behavior and numeric precision, which are the only edge cases an agent might hit here.

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 each of a, b, and operation documented and the operation enum fully spelled out, so the baseline of 3 applies. The description merely echoes the enum values and contributes no extra semantics such as operand ordering or numeric range expectations.

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 gives a specific verb ("performs") plus a resource ("basic arithmetic operations") and enumerates the four supported operations, so an agent can immediately identify the capability. Sibling differentiation is trivially satisfied here since database/echo/fetch-api/file-ops share no overlap, though the description itself does not name or exclude any alternative.

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?

There is no when-to-use or when-not-to-use guidance, no note on which sibling to prefer for, say, string or file work, and no stated constraints. The intended use (quick numeric computation) is only implied by the word "arithmetic".

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools