Skip to main content
Glama

ScorpTech x402 Tools

Mediant

mediant
Read-onlyIdempotent

The mediant of a/b and c/d, which is (a+c)/(b+d) reduced by their gcd. Numerators may be zero. A non-positive denominator is rejected. Returns JSON with: num, den. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/mediant

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": {
      "a": "<a>",
      "b": "<b>",
      "c": "<c>",
      "d": "<d>"
    },
    "name": "mediant"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
cYes
dYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/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 payment requirement ($0.001 USDC per successful call, x402 on Base or Solana), an alternate HTTPS endpoint, the rejection behavior for non-positive denominators, and the return shape (num, den). Cost and error behavior are exactly the kind of traits annotations cannot express.

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?

The definition is front-loaded with the computation, then constraints, then return shape, then access/pricing — every sentence carries distinct information with no repetition or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-operation numeric tool with four scalar parameters and no output schema, the description covers the computation, edge-case handling, return fields, and the access/cost model. Nothing an agent needs to call it correctly is absent.

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 coverage is 0%, so the description must carry the load, and it does: the a/b and c/d framing establishes that a and c are numerators while b and d are denominators, and 'Numerators may be zero' plus the denominator rejection rule add per-role constraints. It stops short of spelling out position-by-position ordering, leaving minor ambiguity.

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 first sentence names the exact operation and gives the closed-form computation: 'The mediant of a/b and c/d, which is (a+c)/(b+d) reduced by their gcd.' That is a specific verb-plus-resource statement an agent can match against a task without opening the schema.

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?

Usage is only implied: the formula makes clear what input shape is expected, and 'A non-positive denominator is rejected' hints at preconditions, but there is no explicit when-to-use, when-not, or pointer to any alternative computation. For a pure math primitive this is acceptable but leaves the agent to infer applicability.

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