Skip to main content
Glama

Weather Markets Edge Desk

Bayesian Probability Update

bayes_update
Read-only

Update a prior probability with one or more pieces of evidence using Bayes theorem. Given a prior and a list of evidence items (each with P(evidence | true) and P(evidence | false)), returns the posterior probability and the per-step chain. Use for "update my estimate with new information", "posterior probability", "how does this news change the odds".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
priorNoPrior probability the hypothesis is true, in % (0–100). Needed for a real answer. Accepts 55, "55%", "55¢", "$0.55", 0.55 or American odds (+120 / -150) — all read as 55%.
evidenceNoOne or more evidence items, applied in order. Each item needs likelihoodIfTrue and likelihoodIfFalse on the 0–100 scale, e.g. [{ "likelihoodIfTrue": 80, "likelihoodIfFalse": 20 }].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / properties / evidence / items / properties / likelihoodIfFalse / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / evidence / items / properties / likelihoodIfFalse / type
      Added value: +[
      +  "number",
      +  "string"
      +]
    • removedInput schema / properties / evidence / items / properties / likelihoodIfTrue / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / evidence / items / properties / likelihoodIfTrue / type
      Added value: +[
      +  "number",
      +  "string"
      +]
    • removedInput schema / properties / prior / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / prior / type
      Added value: +[
      +  "number",
      +  "string"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / evidence / description
      Previous value: -"One or more evidence items, applied in order. Each item needs likelihoodIfTrue and likelihoodIfFalse on the 0–100 scale, e.g. [{ \"likelihoodIfTrue\": 80, \"likelihoodIfFalse\": 20 }]. A single item may be sent as one object."New value: +"One or more evidence items, applied in order. Each item needs likelihoodIfTrue and likelihoodIfFalse on the 0–100 scale, e.g. [{ \"likelihoodIfTrue\": 80, \"likelihoodIfFalse\": 20 }]."
  3. Changed2 schema fields changed
    • changedInput schema / properties / prior / description
      Previous value: -"Prior probability the hypothesis is true, in % (0–100). Accepts 55, \"55%\", \"55¢\", \"$0.55\", 0.55 or American odds (+120 / -150) — all read as 55%."New value: +"Prior probability the hypothesis is true, in % (0–100). Needed for a real answer. Accepts 55, \"55%\", \"55¢\", \"$0.55\", 0.55 or American odds (+120 / -150) — all read as 55%."
    • removedInput schema / required
      Removed value: -[
      -  "prior"
      -]
  4. Changed2 schema fields changed
    • changedInput schema / properties / evidence / description
      Previous value: -"One or more evidence items, applied in order."New value: +"One or more evidence items, applied in order. Each item needs likelihoodIfTrue and likelihoodIfFalse on the 0–100 scale, e.g. [{ \"likelihoodIfTrue\": 80, \"likelihoodIfFalse\": 20 }]. A single item may be sent as one object."
    • changedInput schema / required
      Previous value: -[
      -  "prior",
      -  "evidence"
      -]New value: +[
      +  "prior"
      +]
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, destructiveHint=false and a closed-world scope, so safety is covered. The description adds genuine behavioral context beyond that: evidence items are applied sequentially and the response contains the posterior plus the per-step chain, which matters because there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the computation and its return value, followed by trigger phrasing. Every clause carries information; nothing is padding.

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

Completeness4/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 correctly names what comes back (posterior and per-step chain), and the input schema fully documents both parameters. It does not address error or edge behavior (e.g. contradictory evidence, 0/100 likelihoods), which keeps it from a 5.

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% and the schema is unusually rich, documenting accepted formats (55, "55%", "55¢", "$0.55", 0.55, American odds) and the 0–100 scale. The description only restates the evidence likelihood semantics, so it adds little beyond the schema and the baseline of 3 applies.

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 (update) and resource (prior probability) plus the method (Bayes theorem) and the output (posterior plus per-step chain). This is clearly distinguishable from siblings such as convert_probability or calculate_ev, which do different math on different inputs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use for...' clause supplies three concrete natural-language triggers that map cleanly onto this tool rather than its siblings. It gives no explicit exclusions or named alternatives (e.g. when to prefer base_rate_gap), so it stops short of a 5.

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.