Skip to main content
Glama

Perm Rank

perm_rank
Read-onlyIdempotent

Lexicographic rank of a permutation, or the permutation at a rank. [0, 1, 2] is rank 0 and [2, 0, 1] is rank 4. Give the permutation, or n and a rank, not both. n is at most 10. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/perm-rank

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "perm_rank"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNo
permNo
rankNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

With annotations already covering read-only, idempotent, non-destructive, and open-world behavior, the description adds useful non-schema context: pricing is $0.001 USDC per successful call via x402 on Solana, and an HTTPS endpoint is provided. It does not describe failure behavior or rate limits, but the cost and transport details are meaningful.

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 core operation is front-loaded in the first sentence, followed by concrete examples and the key input exclusivity rule. Pricing and endpoint details come last, so they do not obstruct selection or invocation; every sentence contributes useful context.

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

Completeness5/5

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

For a three-parameter mathematical utility with no output schema and rich safety annotations, the description covers the operation, input modes, examples, n limit, payment, and HTTPS endpoint. The bidirectional return value is implied clearly by the core sentence, leaving no critical invocation ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 explain the three parameters. It does this well by distinguishing the permutation-input mode from the n-plus-rank input mode and showing example permutation format, but it does not fully explain rank bounds or the relationship between n and permutation length beyond the 'n is at most 10' note.

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 states a specific mathematical operation: lexicographic rank of a permutation, or the inverse operation of returning the permutation at a given rank. The examples make the direction and semantics concrete, and the operation is clearly distinct from sibling tools like perm_next, perm_inverse, or perm_compose.

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?

It explicitly tells the caller how to choose between input modes: 'Give the permutation, or n and a rank, not both.' This prevents ambiguous mixed inputs. It does not name alternative sibling tools or when-not-to-use cases, so it falls short of a full routing guide.

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