Skip to main content
Glama

UK Data: Maths and statistics

permutation_count

Read-onlyIdempotent

Calculates the number of permutations P(n,k) = n!/(n-k)! representing ordered arrangements of k elements selected from n elements. Returns the count as an integer. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
kNointeger, required, number of elements to select (must be 0 ≤ k ≤ n)
nNointeger, required, total number of elements (must be non-negative)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already cover the full safety profile (readOnly, idempotent, non-destructive, openWorld), so the description only needs to add what they don't say. It does add two useful facts — the return type (integer) and a cost of 1 credit — but says nothing about error behavior when k exceeds n, which is the only realistic failure mode.

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 sentences, front-loaded with the formula so the agent knows what is being computed immediately, then the return type, then the cost note. No padding; the definition sentence is slightly dense but each clause carries meaning.

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?

For a two-parameter pure-computation tool with no output schema, the definition covers what is computed, the formula, the return type, and the cost. The only gap is what happens on invalid input (k > n), which the schema's constraint text partially covers.

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%, and the schema already states the constraints (0 ≤ k ≤ n, n non-negative). The description's gloss of k as 'elements selected' and n as 'total elements' mostly restates the schema, adding only the P(n,k) framing.

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?

States a specific verb ('Calculates') and resource ('number of permutations'), and pins it down with the exact formula P(n,k) = n!/(n-k)! plus a plain-English gloss ('ordered arrangements'). That is enough to distinguish it from the nearest sibling, factorial, without opening either schema, though it never names that alternative explicitly.

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: the phrase 'ordered arrangements' signals this is the ordered counterpart to an unordered combination, but no when-to-use, when-not-to-use, or alternative tool is named. An agent must infer the routing decision itself.

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.

Resources