Skip to main content
Glama

Liouville Sum

liouville_sum
Read-onlyIdempotent

The sum of Liouville's lambda(k) from 1 through n. The sum through 10 is 0, and the sum through 30 is -4. n runs from 1 to 1000000. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/liouville-sum

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the description needn't repeat safety. It does add behavior the annotations cannot convey: this is a paid call ($0.001 USDC per successful call via x402 on Solana), and an equivalent HTTPS endpoint is provided. The per-successful-call wording usefully implies failed calls are not billed, though payment handshake details are left implicit.

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?

Four short sentences, front-loaded with the mathematical definition before constraints and pricing. Every sentence carries information; the pricing/endpoint sentence is long but necessary and placed last.

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 one-parameter, no-output-schema math tool this is close to complete: definition, domain, sample results, cost, and alternate endpoint. The remaining gap is sibling disambiguation from `liouville`/`mertens` and any note on output magnitude or performance at n near 1,000,000.

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% and the single `n` parameter carries no description, so the description must compensate. It does: restates the 1..1000000 domain and, more importantly, gives two sample outputs that clarify what value is returned for a given n — semantics the schema cannot express.

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?

States a specific verb and resource: the summatory Liouville function, sum of lambda(k) for k=1..n, with worked values (0 through 10, -4 through 30) that pin down the exact convention. It never names the sibling `liouville` (single-term lambda) or `mertens`, so the agent must infer that this is the cumulative variant rather than the per-term one.

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?

No statement of when to use this versus `liouville` for individual terms or other summatory functions. The only 'alternative' mentioned is the same tool over HTTPS, which is an invocation channel, not a tool-selection guideline. The domain, range, and examples let an agent guess the use case, but nothing is explicit.

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