Skip to main content
Glama

ScorpTech x402 Tools

Ballot

ballot
Read-onlyIdempotent

The ballot number B(n, k) = (n-k+1)/(n+1) * binom(n+k, k), for 0 <= k <= n. B(n, n) is the nth Catalan number. k above n is rejected. Both indexes run up to 2048. Returns JSON with: n, k, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/ballot

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

Input Schema

NameRequiredDescriptionDefault
kYes
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive semantics, so the description's added value is the operational layer: the JSON return shape {n, k, value}, the $0.001 USDC x402 payment per successful call on Base or Solana, and the equivalent HTTPS endpoint. The only gap is that 'per successful call' does not say whether rejected k > n inputs are charged or what error output looks like.

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?

Every sentence carries information — formula, domain, edge case, return shape, price, endpoint — with no filler. It is dense to the point of being slightly run-on, and the return/pricing/endpoint facts could be separated more cleanly from the definition, but nothing is wasted.

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?

There is no output schema, yet the description discloses the return fields, and it covers the pricing/payment model an agent must know before invoking an x402 endpoint. For a two-parameter pure-computation tool this is close to complete; only the error/charging behavior on invalid input is left unstated.

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 largely does: it defines n and k mathematically, gives the valid range 0 <= k <= n, restates the 2048 ceiling, and specifies the rejection behavior for k > n. It stops just short of saying whether n and k must be integers or what happens at n = 0.

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 gives the exact closed-form definition B(n, k) = (n-k+1)/(n+1) * binom(n+k, k), so there is no ambiguity about what the tool computes. It also pins down the Catalan special case B(n, n), which distinguishes it from the sibling catalan and binom tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It states the domain constraint (0 <= k <= n, k above n is rejected, indexes capped at 2048), which tells the agent when a call is valid. However, it never explicitly routes between this tool and the closely related siblings binom and catalan — the Catalan relationship is stated as a fact rather than as a 'use catalan instead when...' rule.

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