Skip to main content
Glama

Farey Adjacent

farey_adjacent
Read-onlyIdempotent

Whether a/b and c/d are Farey neighbors. They are adjacent when the determinant ad-bc is 1 or -1. A non-positive denominator is rejected. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/farey-adjacent

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

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
cYes
dYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, it discloses that non-positive denominators are rejected (an explicit error condition) and that the call is metered at $0.001 USDC per successful call via x402 on Solana, plus an equivalent HTTPS endpoint. That is meaningfully more than the annotations provide; only the return behavior after payment failure is left unstated.

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?

Front-loaded with the question, then the criterion, then the rejection rule, then commercial details. Every sentence carries information, though the pricing and URL sentences could be tightened into one.

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

Completeness3/5

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

There is no output schema, and the description never states that the result is a boolean or what it looks like alongside payment metadata, so an agent must infer the return shape from the tool name. It also leaves open whether unreduced fractions are accepted, which matters for a Farey-specific predicate.

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%, so the description must carry the load: it names a/b and c/d and the determinant ad-bc, which lets an agent infer each parameter's role, and it constrains b and d to be positive. It says nothing about the ±1,000,000 magnitude bounds in the schema or whether inputs must be in lowest terms, so it only partially compensates for the coverage gap.

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?

A specific predicate over four named inputs: whether a/b and c/d are Farey neighbors, followed immediately by the exact criterion ad-bc = 1 or -1. An agent cannot mistake this for any sibling, since the drawing power of the determinant test pins the semantics down without consulting 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 implied by the predicate framing — you call it to test adjacency — but the description never says when to prefer it over neighbors like farey_child, farey_count, mediant, or franel. It also does not mention prerequisites beyond the denominator constraint.

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