Skip to main content
Glama

Weighted mean from observation weights

bpj_pairs_weighted_mean
Read-onlyIdempotent

Weight the first series by nonnegative weights supplied in the second series.

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": {
      "x": "<x>",
      "y": "<y>"
    },
    "name": "bpj_pairs_weighted_mean"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is covered. The description usefully adds the constraint that weights must be nonnegative, but says nothing about whether series must be equal length, how zero-sum weights or mismatched lengths are handled, or whether the result is a scalar.

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?

A single sentence with no redundant wording—efficient and front-loaded. It is arguably too terse for the amount of unstated behavior, but nothing in it is wasted.

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?

With no output schema, the description bears responsibility for explaining what is returned, and it never says the result is a weighted mean value. For a two-parameter statistical tool with 0% schema coverage, missing length-alignment and error-handling details leave real gaps.

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%, so the description must carry the load, and it does clarify that the second series (y) holds nonnegative weights applied to the first series (x). However, it adds no detail on the JSON encoding both parameters require, length-matching requirements, or how nulls/non-numeric entries are treated.

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

Purpose3/5

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

The description names a concrete operation (weighting the first series by the second) and the resource involved, but it never states the actual output—a weighted mean—so an agent must rely on the title to know this computes a single summary statistic rather than returning a reweighted series. It also does not distinguish itself from close siblings such as bpj_pairs_weighted_median or bpj_pairs_weighted_variance.

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?

There is no when-to-use guidance, no mention of when the weighted mean is preferable to the weighted median or variance siblings, and no stated prerequisites. The only guidance-like content is the 'nonnegative weights' constraint, which is a validity rule rather than usage direction.

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.