Skip to main content
Glama

permutation

permutation

Calculate permutations P(n,r) to determine the number of ways to arrange r items from n distinct elements. Use this tool for combinatorial mathematics problems involving ordered selections.

Instructions

计算从n个元素中选择r个元素的排列数 P(n,r)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nYes
rYes
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what the tool calculates but doesn't disclose behavioral traits like input validation (e.g., whether r ≤ n is required), error handling, output format, or computational limitations. The description is purely functional without operational context.

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?

The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's front-loaded with the core functionality and uses standard mathematical notation for clarity.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mathematical calculation tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks information about parameter constraints, return value format, error conditions, and mathematical assumptions (e.g., integer inputs, r ≤ n requirement). The description alone doesn't provide enough context for reliable use.

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 0%, so the description must compensate. It explains that n represents 'n个元素' (n elements) and r represents '选择r个元素' (selecting r elements), adding semantic meaning beyond the schema's type constraints. However, it doesn't specify parameter constraints (e.g., r ≤ n, non-negative integers) or provide examples.

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

Purpose5/5

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

The description clearly states the specific mathematical operation: '计算从n个元素中选择r个元素的排列数 P(n,r)' (calculates the number of permutations P(n,r) of selecting r elements from n elements). It uses precise mathematical terminology (排列数, P(n,r)) and distinguishes itself from sibling tools like 'combination' which calculates combinations rather than permutations.

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

Usage Guidelines4/5

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

The description implicitly indicates when to use this tool (for permutation calculations) versus alternatives like 'combination' for combination calculations, but doesn't explicitly name alternatives or provide exclusion criteria. The mathematical context is clear, but no explicit guidance on when not to use it is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaobenyang-com/1777316659204099'

If you have feedback or need assistance with the MCP directory API, please join our Discord server