Skip to main content
Glama

derangement_calc

Read-onlyIdempotent

Count derangements—permutations with no fixed points—for a given size and optionally list every valid arrangement when enumeration is enabled.

Instructions

Count and optionally enumerate derangements (permutations with no fixed points).

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>"
    },
    "name": "derangement_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYesSize of permutation (1-20)
enumerateNoList all derangements (n <= 8)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and openWorldHint, so the safety profile is covered structurally. The description adds that enumeration is optional and supplies the mathematical definition, but says nothing about result size, ordering, or growth of counts. Added value exists but is modest against the annotation baseline.

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?

A single sentence with the primary action front-loaded and the optional behavior as a subordinate clause. Zero filler; every word earns its place.

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 tiny pure-computation tool with full schema coverage, complete annotations and no output schema, the description is sufficient to invoke correctly. It could be richer only by routing to siblings or describing the output shape, which is a minor gap for this complexity.

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 coverage is 100%, so both parameters (n with its 1-20 range, enumerate with its n <= 8 constraint) are documented in structured form. The description's 'count and optionally enumerate' maps loosely onto the two parameters but adds no format or constraint detail beyond the schema, so the baseline 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?

States a specific verb (count/enumerate) and a precise resource (derangements), and even defines the term as permutations with no fixed points. An agent knows exactly what computation it gets. It does not name or distinguish itself from the nearby permutation_calc / combination_calc siblings, which keeps it from 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 Guidelines2/5

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

The description gives no when-to-use guidance and never mentions the closest alternatives (permutation_calc, combination_calc) or when enumeration should be preferred over counting. The only usage hint, n <= 8 for enumerate, lives in the schema, not the description.

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