Skip to main content
Glama

ScorpTech x402 Tools

Stars Bars

stars_bars
Read-onlyIdempotent

The number of ways to place n identical items into k distinct bins, which is C(n+k-1, n). Three items in two bins can be placed in 4 ways. n runs from 0 to 1024 and k runs from 1 to 1024. 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/stars-bars

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": "stars_bars"
  }
}

Input Schema

NameRequiredDescriptionDefault
kYes
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses the return shape ('JSON with: n, k, value'), the valid input domain, and — most importantly — a per-call price of $0.001 USDC via x402 with an alternate HTTPS endpoint. Cost and payment mechanism are behavioral facts an agent must know before calling and are not in any structured field.

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?

Front-loaded with the definition and formula, then example, ranges, return shape, and cost. Five short clauses, each carrying distinct information; nothing is repeated from the schema beyond the numeric bounds, which serve as a restatement for readability.

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?

With no output schema, the description correctly steps in to name the returned fields, and it covers cost and the alternate endpoint. The only gap is error behavior when inputs fall outside the stated ranges, which is minor for a deterministic pure function.

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 bare property names n and k carry no meaning on their own. The description supplies it: n is the number of identical items and k the number of distinct bins, plus the stated ranges. That is a real semantic gain, though it does not explain edge behavior such as k=1 or 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?

States a specific computation (stars and bars counting), gives the closed form C(n+k-1, n), and includes a worked example ('three items in two bins ... 4 ways'). An agent can identify exactly what this returns without opening the schema, and it is clearly distinct from the other number-theory siblings.

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?

The definition makes the domain of applicability obvious (combinatorial placement counting), but never says when to prefer this over alternatives or what it is not for. In a catalog of unrelated math functions the ambiguity is low, so implied usage is adequate, though no explicit routing guidance is given.

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