Skip to main content
Glama

Ternary Nonzero

ternary_nonzero
Read-onlyIdempotent

How many nonzero balanced ternary digits n uses. 0 has none, 3 has 1, 6 has 2, and 5 has 3. n runs from 0 to 999999999999999. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/ternary-nonzero

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and openWorld, so safety is covered. The description adds genuinely useful behavior beyond that: a $0.001 USDC charge per successful call via x402 on Solana and an equivalent HTTPS endpoint. Return format (plain integer) is only implied by the examples.

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, opening with the definition and examples before the access/pricing details. Nothing is bloated; the pricing and endpoint sentences are operational necessities rather than filler.

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 single-argument pure math function with no output schema, the definition plus examples are enough to call it correctly and to predict the returned integer. Only the absence of sibling disambiguation keeps it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but there is only one parameter, so the burden is light. The description restates the domain and range (0 to 999999999999999) that the schema already encodes via minimum/maximum, adding little semantic content beyond what the schema states.

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 computation (count of nonzero balanced ternary digits) and backs it with worked examples (0→0, 3→1, 6→2, 5→3) that pin down exactly what is counted. It is distinguishable from siblings such as ternary_len or ternary_value by the 'nonzero digits' framing, though it never explicitly names them.

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 indication of when to choose this over balanced_ternary, ternary_digit, or ternary_len, and no prerequisites or exclusions. Only the input range and the pricing are given, which is context rather than usage guidance.

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