Skip to main content
Glama

Combinations Calculator

calculator_combinations
Read-only

nCr. Example: 5C2 = 10. Requires 0 <= r <= n.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "n": "<n>",
      "r": "<r>"
    },
    "name": "calculator_combinations"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYesn >= 0.
rYes0 <= r <= n.

Output Schema

NameRequiredDescriptionDefault
nYes
rYes
resultYes
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare a read-only, closed-world, non-destructive computation, so the safety profile is covered. The description only restates the input domain ('0 <= r <= n') and gives a sample result, adding nothing about error behavior for out-of-range input or the type of value returned. With annotations carrying the safety burden, this is a modest contribution.

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 terse fragments with zero filler, and the core notation is front-loaded. The brevity is efficient, though it borders on telegraphic rather than genuinely informative.

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

Completeness3/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-value explanation is unnecessary, and annotations plus a full-coverage schema cover the mechanics. However, for a tool an agent may confuse with permutations, the description does nothing to disambiguate behavior or state the result type (a non-negative integer count), leaving it only minimally sufficient.

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%: 'n >= 0' and '0 <= r <= n' are fully documented in the schema, and the description merely repeats the r constraint. The example values (5 and 2) illustrate typical magnitudes but add no semantics beyond the schema.

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?

The description names the operation by its standard notation 'nCr' and immediately grounds it with a worked example (5C2 = 10), so an agent can identify it as the combinations count. It does not explicitly name the sibling it is distinct from (calculator_permutations) or spell out 'combinations' in prose, keeping it just short of a 5.

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

Usage Guidelines2/5

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

There is no statement of when to use this over calculator_permutations, calculator_binomial, or calculator_probability, nor any context about the domain of applicability. The only guidance is a validity constraint on the inputs.

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.