Skip to main content
Glama

x402-median

Median: Calculate the median of a numeric array. Provide values; returns the middle value (or average of two middles for even counts).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesNoValues to process
numbersNoNumbers to process

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / values
      Added value: +{
      +  "description": "Values to process",
      +  "type": "string"
      +}
  2. First observed

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations present, the description carries the full behavioral burden. It does disclose the one meaningful behavior – that even-length inputs return the average of the two middle values – but says nothing about input format, empty-array handling, non-numeric input, or error behavior.

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 operation front-loaded and the edge case appended; nothing is padded. The opening "Median:" label merely echoes the tool name, which is minor waste.

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

Completeness2/5

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

There are no annotations and no output schema, and two ambiguous optional string parameters, so the description should explain the accepted input encoding and error handling. It instead stops at the definition, leaving the agent guessing how to supply the array.

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 baseline is 3, and the schema descriptions ("Values to process", "Numbers to process") are tautological placeholders. The description says only "Provide values" and adds no format detail, leaving the duplicate optional params `values` and `numbers` unresolved.

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 of a numeric array") and even clarifies the even-count case. It is clear on its own, but it never distinguishes itself from the many neighbouring statistical siblings such as x402-weighted-median, x402-median-absolute-deviation, or x402-median-filter.

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, no prerequisites, and does not name an alternative (e.g. x402-mean-of, x402-mode) for the agent to route between. Usage is only implied by the mathematical operation itself.

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