Skip to main content
Glama

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. Price: $0.001 USDC per successful call (x402, 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?

The annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so safety and idempotency are covered. The description adds useful behavioral context beyond annotations: vertex range 1..30, pricing at $0.001 USDC per successful call, x402/Solana payment context, and the HTTPS endpoint.

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 front-loaded with the core operation, then examples, constraints, price, and endpoint. Every sentence adds useful information for calling the tool, with no filler or repetition.

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 simple one-parameter encoding tool with no output schema, the description provides examples of return values, vertex range, edge format, and payment/endpoint details. It is nearly complete, though it does not describe behavior for invalid inputs such as non-trees or disconnected graphs.

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 burden, and it does clarify the key semantics: edges are a flat list of pairs, vertices run from 1 to 30, and examples show how a path or star maps to the output code. It could still be more explicit about output shape or invalid-tree behavior, but the single required parameter is meaningfully documented.

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 identifies the specific operation: producing 'The Prüfer code of a tree' from a flat list of edge pairs, reinforced by the title 'Prufer Encode.' It is clear enough to distinguish encoding from unrelated tools, but it does not explicitly differentiate itself from nearby siblings such as prufer_decode or prufer_degree.

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 provides examples and input constraints but never states when this tool should be used instead of alternatives like prufer_decode or prufer_degree. There is no explicit when-not guidance or routing logic, leaving the agent to infer usage from the name and examples.

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