Skip to main content
Glama

ScorpTech x402 Tools

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. Returns JSON with: perm, n, rank. Price: $0.001 USDC per successful call (x402, Base or 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?

Annotations already cover safety (readOnly, idempotent, non-destructive, open-world), and the description adds genuinely new behavioral context: the $0.001 USDC x402 cost per successful call, the Base/Solana payment rails, the equivalent HTTPS endpoint, and the returned fields. It does not say what happens when both inputs are supplied or when rank exceeds n!−1 (the schema's 3628800 bound actually equals 10!, not 10!−1), leaving real edge-case behavior undisclosed.

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 definition is front-loaded with the core semantics and examples, then the input rule, the bound, the return shape, and finally payment/endpoint logistics. Each sentence conveys distinct, usable information with no filler.

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, non-nested tool with no output schema, the description supplies the operation semantics, the invocation rule, the size constraint, the return keys, and the cost model. An agent has everything needed to decide to call it and to construct a valid request.

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 carry the meaning, and it does explain the roles of perm, n, and rank plus the "not both" exclusivity and the n ≤ 10 cap. It stops short of documenting per-parameter bounds (rank's maximum, element range), so full compensation for the coverage gap is incomplete.

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 names the exact operation and both directions of it: "Lexicographic rank of a permutation, or the permutation at a rank." The worked examples ([0,1,2] → 0, [2,0,1] → 4) pin down the ranking convention unambiguously, which an agent could not infer from the name alone.

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 clearly states the two invocation modes and their mutual exclusivity: "Give the permutation, or n and a rank, not both." That is concrete input-mode guidance, but there is no explicit routing to siblings such as perm_next or perm_compose, so an agent must already know it wants a rank conversion.

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