Skip to main content
Glama

median

Calculates the median of a dataset, returning the middle value of a sorted list to identify the central tendency of your numbers.

Instructions

Calculate the median of a dataset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numbersYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/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 discloses nothing about edge cases (even-length datasets averaging the two middle values, empty input handling, ordering requirements), though the operation itself is a deterministic pure computation with low risk.

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?

A single, front-loaded sentence with zero filler. It is appropriately sized for a simple unary math function.

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?

An output schema exists, so return-value explanation is unnecessary, and the tool is a simple pure computation. The description is nearly complete for its complexity, with only edge-case behavior (empty/even-length input) left implicit.

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 0% for the single 'numbers' parameter, so the description should compensate. 'dataset' hints at an array of values, which aligns with the schema, but it does not state the expected element type, non-emptiness, or numeric-only constraint.

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 ('Calculate the median') and, by naming 'median', implicitly distinguishes itself from the many sibling statistics tools (mean, mode, variance, etc.). It is clear but offers no explicit sibling-differentiation guidance.

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 when-to-use guidance and no alternatives named. With siblings like mean, mode, and percentile, a note on when median is preferred (e.g., robust to outliers) would add real value; the description provides none.

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