Skip to main content
Glama

x402-expected-value

Expected Value: Computes expected value from equal-length values and probabilities arrays, summing each value times its probability 🆓 5 free trial calls per signed wallet

Input Schema

NameRequiredDescriptionDefault
valuesNo
probabilitiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / probabilities / description
      Removed value: -"Probabilities to process"
    • removedInput schema / properties / values / description
      Removed value: -"Values to process"
  2. Changed2 schema fields changed
    • addedInput schema / properties / probabilities
      Added value: +{
      +  "description": "Probabilities to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / values
      Added value: +{
      +  "description": "Values to process",
      +  "type": "string"
      +}
  3. First observed

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It does add two useful facts: the arrays must be equal-length, and the service offers 5 free trial calls per signed wallet (an auth/pricing condition). It says nothing about error behavior when lengths mismatch or about the return shape, so it is only partially complete.

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 single sentence that defines the operation before the trailing trial-call promotion. The promo and emoji are mild noise but are short and convey an auth condition, so the text stays efficient.

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?

For a simple two-parameter calculator with no output schema, the formula and the equal-length constraint cover most of what is needed. The unresolved question of how array inputs are encoded as strings, plus the lack of any error semantics, keeps this at minimum-viable rather than complete.

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 coverage is 0% and both parameters are typed only as strings, so the description has to compensate. It explains that 'values' are values and 'probabilities' are probabilities combined as value × probability, plus the equal-length constraint, which is real added meaning. However, it never explains the string encoding of the arrays (JSON? CSV?), leaving a format gap.

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 ('Computes expected value') and even the formula ('summing each value times its probability'), which tells an agent what it will get. It does not name or distinguish itself from close siblings such as x402-weighted-mean or x402-weighted-average, so it falls short of the top score.

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 prerequisites, and no mention of alternatives like weighted-mean or mean-of. Usage is only implied by the statistics context of the name.

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