Skip to main content
Glama

permutation_calc

Read-onlyIdempotent

Calculate the number of ordered arrangements (permutations) for n items taken r at a time, with r defaulting to n.

Instructions

Calculate the number of permutations P(n,r) - ordered arrangements.

Input Schema

NameRequiredDescriptionDefault
nYesTotal number of items.
rNoNumber of items to arrange (defaults to n).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is fully covered by structured data. The description adds no behavioral context such as invalid-input handling (r > n), integer requirements, or output type, so it only defines the math.

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?

One short sentence, front-loaded with the verb and the exact formula. Nothing wasted and nothing buried.

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 math function with full schema coverage, no output schema and strong read-only annotations, the description gives enough to call it correctly. The remaining gap is edge-case behavior for invalid inputs, which is minor here.

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 = total items, r = items to arrange, defaults to n), so the schema does the heavy lifting. The P(n,r) notation adds a marginal semantic hint that r must not exceed n, but no format or constraint detail 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?

States a specific operation with the P(n,r) notation and parenthetical 'ordered arrangements', which pins down the mathematical intent precisely. It doesn't name the obvious sibling combination_calc, so the ordered-vs-unordered distinction is only implied.

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: 'ordered arrangements' hints at when to pick this over an unordered combination tool, but the description never states an explicit when-to-use or when-not-to-use condition and names no alternative.

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