Skip to main content
Glama

probability.nCr

Read-onlyIdempotent

Calculates exact binomial coefficients C(n,r) for unordered selection counts, returning the result as an integer string without rounding.

Instructions

이항계수 C(n, r) = n!/(r!(n-r)!)을 정확한 정수 문자열로 반환한다. n, r 은 0 이상 정수(r ≤ n, n 상한 20000)이며 반올림은 없다. 순서를 구분하는 선택에 쓰면 r! 배 작게 나오므로 그 경우는 nPr 을 쓴다.

Input Schema

NameRequiredDescriptionDefault
nYes
rYes

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, so the safety profile is covered; the description adds real domain behavior: exact integer output with no rounding, and a hard n ≤ 20000 ceiling that an agent must respect to avoid failure. It stops short of saying what error behavior looks like when n > 20000, which keeps it off a 5.

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: definition and return format first, then validity constraints, then the sibling disambiguation. Nothing is redundant with the schema or annotations, and every clause adds information.

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 no explanation, and the description covers the remaining gaps: exactness, input validity domain, size ceiling, and the alternative tool for ordered selections. An agent has everything needed to call this correctly on the first attempt.

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% (bare 'N'/'R' integers), so the description carries the full burden and does: it states both are non-negative integers, that r ≤ n, and that n is capped at 20000 — constraints absent from the schema. It could go further by naming failure behavior on invalid input, so 4 rather than 5.

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 and resource ('이항계수 C(n, r) = n!/(r!(n-r)!)을 ... 반환한다') and pins down the exact mathematical object via the formula, leaving no ambiguity. It also names the confusable sibling (nPr) and explains the relationship, so an agent can distinguish it from probability.nPr without opening either schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: if the selection is ordered, the result here is r! times too small and the agent should use nPr instead. That is a named alternative plus the precise condition that selects it, matching the highest calibration band.

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