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 }]. A single item may be sent as one object.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      -]
  2. 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"
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=true, openWorldHint=false), so the description's main added value is behavioral: it discloses the return payload (posterior probability plus the per-step chain) and that evidence is applied in order, which matters for multi-item chaining. It omits edge-case behavior such as prior at 0/100 or zero likelihoods, which would be the remaining useful disclosure.

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?

Three sentences, front-loaded with the core operation before inputs and use cases; nothing is padded. The trailing quoted trigger list is slightly list-like and overlaps the usage-guideline role, but it stays short and earns its place as intent matching.

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 compensates by naming the return value (posterior and per-step chain), and the schema fully documents inputs. The gap is behavioral edge cases (degenerate priors/likelihoods, failure modes) for a numeric computation tool where a division-by-zero or 0/100 prior is plausible.

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 both parameters are thoroughly documented there, including accepted input formats ('55%', '$0.55', American odds) and the 0–100 scale. The description only restates this at a high level, adding no syntax or constraint detail beyond the schema, so 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+resource (update a prior probability with evidence via Bayes theorem) and enumerates both the inputs (prior, evidence with P(evidence|true)/P(evidence|false)) and the outputs (posterior plus per-step chain). This cleanly distinguishes it from siblings like convert_probability and calculate_ev, which do not perform evidence chaining.

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?

Supplies concrete trigger phrasing ('update my estimate with new information', 'posterior probability', 'how does this news change the odds') that maps user intent to this tool. However, it never names an alternative or a when-not-to-use condition — e.g., pointing to convert_probability for pure odds conversion or base_rate_gap for base-rate reasoning — so routing among siblings is still partly inferred.

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.