Skip to main content
Glama

Median Calculator

calculator_median
Read-only

Median of a dataset. Odd: middle value; even: average of two middle values.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "data": "<data>"
    },
    "name": "calculator_median"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesNon-empty list of numbers.

Output Schema

NameRequiredDescriptionDefault
resultYes
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), so the bar is lower; the description still adds real behavioral value by disclosing exactly how the result is computed for odd versus even cardinality. Empty-input handling is delegated to the schema ('Non-empty list of numbers'), and return shape is covered by the output schema, so no material gap remains.

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?

Two short sentences, zero filler, and the core definition is front-loaded ahead of the odd/even edge-case rule. Every clause carries information an agent needs.

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?

For a single-parameter, single-value pure computation with full annotations, 100% schema coverage, and an output schema, the description supplies everything required to call it correctly. Nothing essential is missing.

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% and the single required parameter 'data' is documented with examples, so the schema does the heavy lifting. The description's word 'dataset' loosely corresponds to the parameter but adds no format or constraint detail beyond what the schema states.

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 resource (median of a dataset) and defines the computation for both odd and even lengths, which makes it unambiguous against siblings like calculator_mean or calculator_average. It stops short of explicitly naming those alternatives, so differentiation comes from the word 'median' alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

For a pure math function the implied usage is strong: pass a numeric list, get the median. But there is no explicit routing guidance versus calculator_mean, calculator_average, or calculator_mode, and no exclusions stated, so usage is only implied.

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.