Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Average

calculate_average
Read-onlyIdempotent

Compute simple, weighted, geometric, or harmonic mean. Use for grade averages, returns, or rates. Inputs: values list, optional weights, mode. Returns mean and detail. See list_bundles for related 'math' calculators.

Input Schema

NameRequiredDescriptionDefault
valuesYesArray of numbers
weightsNoOptional weights for weighted average

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/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 adds only that it returns 'mean and detail', which is thin behavioral context and arguably redundant given the output schema exists.

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?

Front-loaded with the core verb and the supported variants, and each sentence is short. The lone blemish is the erroneous 'mode' input mention and the somewhat gratuitous list_bundles pointer, but overall it is tight.

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

Completeness3/5

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

The output schema exists so return-value description is not required, and the description covers purpose and inputs adequately. However, the nonexistent 'mode' parameter and the unexplained mechanism for choosing between mean types leave a real gap for a tool with four distinct modes.

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 coverage is 100%, so the baseline would be 3, but the description claims inputs include 'mode' — a parameter that does not exist in the schema (only values and weights are defined). This introduces a phantom parameter that could mislead an agent about how geometric/harmonic selection is made, offsetting the schema's own quality.

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 a specific verb (compute) and resource (mean/average) and enumerates the four variants it supports (simple, weighted, geometric, harmonic), which distinguishes it from generic arithmetic siblings like calculate_statistics or calculate_grade_average. An agent can identify its scope without opening the schema.

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?

'Use for grade averages, returns, or rates' gives loose usage contexts but names no alternatives and provides no when-not-to-use guidance, despite there being a dedicated calculate_grade_average sibling. The 'See list_bundles' pointer is a catalog cross-reference, not real routing guidance.

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.