Skip to main content
Glama

probability.bayes

Read-onlyIdempotent

Computes posterior probability P(A|B) from prior, likelihood, and non-zero marginal values using Bayes' theorem with 50-digit decimal precision for statistical and financial analysis.

Instructions

베이즈 정리로 사후확률 P(A|B) = P(A)P(B|A)/P(B)를 구한다. prior, likelihood, marginal 은 [0, 1] 구간 십진 문자열이고 marginal 은 0 이 될 수 없으며 Decimal 50자리 정밀도로 계산한다. 입력 간 정합성(P(B) ≥ P(A)P(B|A))은 검사하지 않으므로 marginal 은 전체 확률 법칙으로 먼저 구해야 한다.

Input Schema

NameRequiredDescriptionDefault
priorYes
marginalYes
likelihoodYes

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
posteriorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover readOnly/idempotent/closed-world, but the description adds behaviors the annotations cannot: Decimal 50-digit precision, the [0,1] domain, marginal ≠ 0, and the fact that input consistency is NOT validated. Warning about the absence of a validation check is exactly the kind of trap-prevention context that adds value beyond structured fields.

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 tight sentences: what it computes, then input format/constraints, then the non-validation caveat. Each sentence carries distinct information and the formula is front-loaded.

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?

An output schema exists, so return values need not be explained. With a mutation-free, single-purpose math tool and 3 required scalar params, the description supplies domain, format, precision, preconditions, and the key failure mode. Nothing an agent needs to call it correctly is missing.

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 coverage is 0%, so the description must carry the parameter burden, and it does: all three inputs are named, constrained to decimal strings in [0,1], with marginal explicitly nonzero, and their roles are inferable from the formula. It stops short of explicitly mapping prior=P(A), likelihood=P(B|A), marginal=P(B) by name, leaving a small inference gap.

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?

The description names a specific operation and the exact formula it implements: posterior P(A|B) = P(A)P(B|A)/P(B) via Bayes' theorem. No sibling in the probability.* family computes Bayes, and the verb+resource is unambiguous. An agent can identify this tool from the description alone.

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?

It specifies a real usage prerequisite: marginal must be derived via the law of total probability first because the tool will not check P(B) ≥ P(A)P(B|A). That is actionable context. It does not discuss when to choose a different tool, but no direct alternative exists in the sibling list, so the practical guidance burden is mostly met.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools