Skip to main content
Glama
Chetto983

Mathematical Calculator MCP Server

by Chetto983

median

Computes the middle value of a list of numbers, returning the central number or the average of the two middle values for even-length data.

Instructions

Computes the median of a list of numbers.

Args: data: A list of numerical values.

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

Examples: >>> median([1, 2, 3, 4]) {'result': 2.5}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

B3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It helpfully discloses the return shape for success and error, and the example shows even-length median behavior. It does not document edge cases such as empty input, non-numeric values, or ordering assumptions, so the disclosure is only partial.

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?

The description is appropriately sized for a simple math utility and front-loads the core purpose. Args, Returns, and a compact example each add practical value, though the Args section is somewhat redundant with the schema and could be tighter.

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 one-parameter pure computation tool with no output schema, the description supplies the essential call signature, return format, and an example. It is minimally sufficient, but it omits edge-case behavior that an agent might need to invoke the tool confidently, such as empty-list handling or ordering expectations.

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

Parameters2/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 compensate for the undocumented parameter. It says only that data is a list of numerical values, which mostly repeats the schema type (array of numbers) and adds no constraints such as non-empty input, sorting requirements, or handling of null/NaN values.

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 states a specific verb and resource: it computes the median of a list of numbers. This clearly distinguishes it from close siblings like mean, variance, and standard_deviation by naming the exact statistical measure. However, it does not explicitly contrast itself with those alternatives, so it falls short of the top 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 says what the tool does but gives no guidance about when to use median instead of mean or another central-tendency tool. There are no conditions, exclusions, or alternatives named, leaving the agent to infer usage from the tool name alone.

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