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".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "bayes_update"
  }
}

Input 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. Changed3 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / evidence / items / properties / likelihoodIfFalse / description
      Previous value: -"P(observing this evidence | hypothesis is false), in % (0–100). Accepts a number or a numeric string (\"3\", \"3pp\", \"3%\")."New value: +"P(observing this evidence | hypothesis is false), in % (0–100)."
    • changedInput schema / properties / evidence / items / properties / likelihoodIfTrue / description
      Previous value: -"P(observing this evidence | hypothesis is true), in % (0–100). Accepts a number or a numeric string (\"3\", \"3pp\", \"3%\")."New value: +"P(observing this evidence | hypothesis is true), in % (0–100)."
  2. 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"
      +]
  3. 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 }]."
  4. 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"
      -]
  5. 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"
      +]
  6. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false and destructiveHint=false, so the safety profile is covered. The description adds genuinely new context by stating that it returns the posterior plus a per-step chain, which matters since there is no output schema. Minor gap: it doesn't say how evidence items are combined when several are supplied.

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?

Three short sentences, front-loaded with the operation, then inputs, then output, then intent triggers. Every sentence carries distinct information with no filler.

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

Completeness5/5

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

The tool has only two parameters, both fully described in the schema, and no output schema — and the description fills that gap by naming the return values (posterior and per-step chain). An agent has everything needed to call it correctly.

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 itself spells out accepted prior formats (percent, dollars, American odds) and the likelihood pair. The description only restates 'prior' and 'list of evidence items' with their likelihoods, adding no format or edge-case detail beyond the schema — baseline 3 applies.

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 ('Update a prior probability ... using Bayes theorem') and even previews the computation inputs and output. It doesn't explicitly differentiate itself from siblings like convert_probability or calculate_ev, but the mathematical operation is distinctive enough that an agent can place it.

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?

Provides concrete trigger phrases ('update my estimate with new information', 'posterior probability', 'how does this news change the odds') that map intent to tool selection. It stops short of naming when NOT to use it or pointing to an alternative such as convert_probability for plain probability-format conversion.

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.