Skip to main content
Glama

Permutation & Combination Calculator

PermutationCombinationCalculator
Read-only

Permutation & Combination Calculator: Calculate permutations (P(n,r)) and combinations (C(n,r)) for any given values of n and r. (Cost: 1 credit)

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": "PermutationCombinationCalculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYesTotal number of items
rYesNumber of items to choose (must be <= n)

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNoError message, null on success
statusNo"ok" on success

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true and destructiveHint=false, so the safe-read profile is covered without the description's help. The description does add one genuine piece of behavioral context not in the structured fields — a 'Cost: 1 credit' charge — but it says nothing about what exactly is computed and returned, or the openWorldHint=true designation.

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?

A single front-loaded sentence plus a parenthetical cost note — no filler and the operation is stated first. Slightly redundant since the title repeats the tool's purpose verbatim in the opening clause.

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?

The tool is simple and an output schema exists, so return-value explanation is not needed, and the parameters are fully documented in the schema. The main gap is that the description never says whether both permutation and combination results are produced in one call or whether one must be selected, which matters for interpreting the call.

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%, with both n ('Total number of items') and r ('Number of items to choose, must be <= n') fully documented and exemplified. The description adds no constraint, format, or edge-case guidance beyond restating the P(n,r)/C(n,r) notation, so the baseline of 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?

The description states a specific verb ('Calculate') and the exact resources ('permutations (P(n,r))' and 'combinations (C(n,r))'), with the mathematical notation making the operation unambiguous. It does not clarify whether a single call returns both P and C or how it differs from the sibling MathCalculator, which prevents 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 Guidelines3/5

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

Usage is only implied by the clear purpose; there is no explicit statement of when to use this versus MathCalculator or other numeric siblings, and no preconditions or exclusions. For a self-evident single-purpose calculator this is minimally adequate, but nothing routes the agent between this tool and its alternatives.

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.