Skip to main content
Glama

median

Need to find the central value in a dataset? Compute the middle number from a non-empty list to get a robust summary.

Instructions

Calculate the median of a non-empty list.

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.3/5.0
Behavior2/5

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

With no annotations, the burden is on the description to disclose behavior. It adds only the non-empty precondition; it does not mention handling of even-length lists, sorting, or error behavior. The behavior beyond the bare calculation is largely undisclosed.

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 sentence with no filler; the core operation and the key precondition are front-loaded. It is as concise as the tool's simplicity allows.

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 one-parameter math tool with an output schema, the description covers the required input and the operation. Some richer context about how median is computed is absent, but the schema and the common mathematical meaning likely prevent mis-calls.

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 should compensate, but it only adds 'non-empty' to the schema's 'numbers' array. It does not clarify number types, ordering, or valid value ranges beyond what the schema already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the exact operation: 'Calculate the median' of a list. This is distinct from siblings like mean, sum, or product, and the phrase 'non-empty list' adds a precondition. No ambiguity about the resource.

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 gives no when-to-use guidance or alternatives. It does not explain that median is preferable to mean for skewed distributions or outlier-prone data, and it never mentions sibling tools. Only a precondition ('non-empty') is stated, which is not usage direction.

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