Skip to main content
Glama

minia2a — hosted x402 API marketplace (HTTP)

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

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": {
      "probabilities": "<probabilities>",
      "values": "<values>"
    },
    "name": "x402-expected-value"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYes
probabilitiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / required
      Added value: +[
      +  "probabilities",
      +  "values"
      +]
  2. Changed2 schema fields changed
    • removedInput schema / properties / probabilities / description
      Removed value: -"Probabilities to process"
    • removedInput schema / properties / values / description
      Removed value: -"Values to process"
  3. First observed

TDQS

A3.5/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It usefully discloses the algorithm (sum of value × probability) and the equal-length constraint, but says nothing about what happens when arrays mismatch, how inputs are encoded, or what the response looks like. For a deterministic pure computation the risk is low, which supports a 3 rather than lower.

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 operation in a single compact sentence, with the defining formula stated immediately. The trailing emoji and free-trial marketing line are non-functional noise that keeps it from a 5.

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 two-parameter pure computation with no output schema, the agent still lacks the return type (scalar) and the input encoding for the string-typed array parameters. The equal-length constraint is a real addition, but the definition is not fully self-sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and both parameters are typed only as generic strings, so the description does real work by clarifying they are parallel arrays of values and probabilities that must be equal length. The one gap is that it never explains how arrays are serialized into a string parameter.

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 names the exact computation, so it is distinguishable from siblings like x402-present-value or x402-enterprise-value by the formula given. It stops short of explicitly contrasting itself with those siblings, which keeps it from a 5.

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?

Usage is only implied: the stated formula makes clear which situations fit (discrete outcomes with probabilities), but there is no explicit when-to-use, when-not-to-use, or pointer to adjacent value tools. Nothing misleading, just under-specified.

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.