Skip to main content
Glama

ScorpTech x402 Tools

Prufer Encode

prufer_encode
Read-onlyIdempotent

The Prüfer code of a tree on vertices 1..n. Edges are a flat list of pairs. The path 1-2-3-4 gives 2,3. The star with center 1 and leaves 2,3,4 gives 1,1. Two vertices give an empty code. Vertices run from 1 to 30. Returns JSON with: n, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/prufer-encode

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": {
      "edges": "<edges>"
    },
    "name": "prufer_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive behavior. The description adds useful behavioral context: the return shape is JSON with n and value, and the call costs $0.001 USDC via x402, with an HTTPS alternative endpoint. It does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core operation and uses compact examples to disambiguate the input encoding. Pricing and HTTPS endpoint details are operational rather than invocation-critical, but they are short and do not obscure the main definition.

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 simple one-parameter computation with no output schema, the description supplies the input format, vertex range, output fields, edge cases, examples, pricing, and endpoint. Nothing essential to calling the tool correctly appears to be missing.

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?

With 0% schema description coverage, the description carries the burden and does a good job explaining that edges is a flat list of pairs, that vertices are 1..30, and how input maps to output via examples. It could additionally state that the edge list length must be even, but the examples make the intended encoding clear.

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?

The description clearly states that the tool computes the Prüfer code of a tree and defines the input as a flat edge list. It does not explicitly differentiate itself from the sibling prufer_decode tool, but the specific verb+resource and examples make the purpose clear.

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?

It explains the input format and gives worked examples, but it does not say when to use this tool versus prufer_decode or other sibling tools, nor does it provide prerequisites or exclusions. Usage is implied only by the mathematical operation itself.

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