Skip to main content
Glama

Permutations Calculator

calculator_permutations
Read-only

nPr. Example: 5P2 = 20. 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_permutations"
  }
}

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/5.0
Behavior3/5

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

Annotations already declare this a pure, non-destructive, closed-world read operation, so the safety profile is fully covered elsewhere. The description's only behavioral addition is the constraint 0 <= r <= n, which duplicates what the r property already states; it says nothing about error behavior or large-value limits. Adequate but minimal given the low bar set by annotations.

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 short fragments with zero filler, and the identifying token 'nPr' plus example are front-loaded. The terseness approaches cryptic, but every element carries information and nothing is wasted.

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 a full schema, an output schema, and annotations covering safety and world-closure, the description only needs to identify the operation and its domain constraint, and it does both. Only the lack of sibling disambiguation keeps it from being fully complete.

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% — both n ('n >= 0') and r ('0 <= r <= n') are documented, and examples are attached to each property. The description restates the r constraint without adding notation, ranges, or domain meaning beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The fragments 'nPr' plus a worked example (5P2 = 20) do convey that this computes permutations of n items taken r at a time, matching the title. However, the abbreviation is left unexpanded and there is no acknowledgement of the obvious siblings (calculator_combinations, calculator_factorial), which are the main confusion risk in a toolset of 130+ calculators.

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 when-to-use guidance and no named alternative. An agent deciding between permutations, combinations, and factorial gets no routing help from the description beyond the raw nPr notation.

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.