Skip to main content
Glama

UK Data: Maths and statistics

calculate_median

Read-onlyIdempotent

Calculates the median (middle value) of a list of numbers. For even-length lists, returns the average of the two middle values. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
numbersNoarray of numbers, required, list of numeric values to find the median of

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description still adds genuine behavioral value by specifying the even-length rule (averaging the two middle values) and the credit cost, though it omits what happens with an empty or non-numeric list.

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?

Two tight sentences with the core behavior front-loaded, followed by the cost tag. Nothing is redundant or padded; the edge-case clause is worth its space.

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

Completeness4/5

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

For a single-parameter arithmetic tool with full annotation coverage and no output schema, the definition says enough to call it correctly, including the return semantics for even-length input. Only minor gaps remain around invalid input and the accepted string form of the parameter.

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%, so the schema already documents the single 'numbers' parameter, making 3 the baseline. The description reinforces that it expects a list of numeric values but does not clarify the schema's string alternative (anyOf array-of-strings or plain string), leaving that parsing detail undocumented.

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?

Names a specific verb and resource ('Calculates the median') and even pins down the edge case semantics ('middle value', average of two middle values for even-length lists). It does not explicitly distinguish itself from the many sibling statistics tools such as 'average' or 'calculate_standard_deviation', so it stops short of a 5.

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?

No guidance on when to choose this over the sibling 'average' or 'calculate_standard_deviation' tools, and no prerequisites or exclusions. The only indirect signal is the '(cost: 1 credit)' note, which hints at a budget consideration but says nothing about when to invoke the tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources