Skip to main content
Glama

Balanced Ternary

balanced_ternary
Read-onlyIdempotent

The balanced ternary digits of n. -1 is written as T. 0 is "0", 2 is "1T", 4 is "11", 5 is "1TT", and 6 is "1T0". 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/balanced-ternary

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

Input Schema

NameRequiredDescriptionDefault
nYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real context beyond that: the accepted input range (0 to 999999999999999) and, unusually usefully, the cost model ($0.001 USDC per successful call via x402 on Solana) plus the equivalent HTTPS endpoint. That pricing/transport disclosure is valuable for an agent deciding whether to invoke.

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?

Purpose is front-loaded in the first clause, and the five examples efficiently convey the output alphabet. Slightly padded by repeating the range already in the schema and by trailing cost/endpoint boilerplate, but nothing is superfluous to correctness.

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-integer read-only math function with no output schema, the description effectively specifies the return format through examples and gives cost and an alternate transport. Almost everything an agent needs to call it correctly is present.

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 description coverage is 0% for a single required parameter 'n'. The description restates the numeric range that the schema already encodes and doesn't further clarify n's meaning, but the examples implicitly define the input-to-output mapping, so it partially compensates.

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 the specific result ('balanced ternary digits of n') and backs it with concrete encoding examples (-1 as T, 6 as 1T0), so an agent knows exactly what comes back. It doesn't name sibling variants like ternary_digit or negabinary, but the digit-string framing is distinctive enough.

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 prefer this over ternary_digit, ternary_value, negabinary, or base_convert. The examples imply the use case but the agent must infer routing; no exclusions or prerequisites are 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