Skip to main content
Glama

ScorpTech x402 Tools

Legendre Symbol

legendre_symbol
Read-onlyIdempotent

The Legendre symbol (a/p) for an odd prime p. (2/7) is 1, (3/7) is -1, and (-1/5) is 1. p must be an odd prime. a runs from -1000000000000 to 1000000000000, and p runs from 0 to 1000000000000. Returns JSON with: a, p, value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/legendre-symbol

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

Input Schema

NameRequiredDescriptionDefault
aYes
pYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile needs no restating. The description instead adds genuinely new operational context: the return shape (a, p, value), the per-call price and payment rails (x402 on Base or Solana), and an equivalent HTTPS endpoint — details an agent could not get from structured fields.

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?

The sentence order is well front-loaded: definition, examples, constraints, return shape, then pricing/endpoint. It is dense but nearly every clause carries information; the repeated domain bounds are the one mildly redundant element.

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?

With only two parameters, no output schema, and annotations covering safety, the definition supplies everything needed to call it correctly: valid inputs, the prime requirement, the returned fields, and cost/transport details. Nothing material is missing for a function of this complexity.

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 parameter meaning, and it does add one constraint the schema lacks: p must be an odd prime, even though the schema allows any integer from 0 to 1e12. The stated ranges duplicate the schema's minimum/maximum values rather than adding to them, which keeps this from a 5.

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 description names the exact mathematical operation with its notation, '(a/p) for an odd prime p', and reinforces it with three concrete worked examples. An agent can tell precisely what this computes 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 definition itself and the domain constraint that p must be an odd prime, but the description gives no explicit when-to-use guidance and does not distinguish this from the sibling legendre_pol. For a narrowly-scoped math function the inference is easy, but the guidance is not stated.

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