Skip to main content
Glama
Chetto983

Mathematical Calculator MCP Server

by Chetto983

mode

Calculates the most frequent value from a list of numbers, returning its frequency-based central tendency for statistical analysis.

Instructions

Computes the mode of a list of numbers.

Args: data: A list of numerical values.

Returns: On success: {"result": } On error: {"error": }

Examples: >>> mode([1, 2, 2, 3]) {'result': 2.0} >>> mode([1, 1, 2, 2]) {'result': 1.0} >>> mode([]) {'error': 'Cannot compute mode of empty array'}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does reasonably well: it documents the return shape ({'result': ...}), the error shape ({'error': ...}), and a concrete failure case for empty input. It omits tie-handling semantics (e.g., multimodal lists return the smallest value, as shown by [1,1,2,2] -> 1.0), which is a notable undocumented behavior, but overall it discloses solid 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?

Front-loaded with a one-line purpose, then Args/Returns/Examples in a clean docstring layout. Nothing is padded — the examples, including the error case, each earn their place by clarifying concrete behavior.

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

Completeness5/5

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

There is no output schema, so the description correctly compensates by specifying both success and error return shapes. For a simple single-parameter function with no annotations, it supplies everything an agent needs to call it and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain the single parameter — which it does: 'data: A list of numerical values.' This adds the semantic constraint (numerical values) beyond the bare array schema. The examples further clarify accepted input forms, including the empty-list edge case.

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?

States a specific verb and resource: 'Computes the mode of a list of numbers.' This is unambiguous and clearly distinct from statistical siblings like mean, median, and variance. It doesn't explicitly reference those siblings, but the operation name alone is enough to route correctly.

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 examples but no guidance on when to use mode versus the many sibling statistics tools (mean, median, variance, etc.). No conditions, prerequisites, or alternatives are mentioned, so the agent must infer selection on its own.

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