Skip to main content
Glama

x402-is-quadratic-residue

Is Quadratic Residue: Checks whether a is a quadratic residue mod p by the Euler criterion; true when a mod p is 0, errors if p<2 🆓 5 free trial calls per signed wallet

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "x402-is-quadratic-residue"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNo
pNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / a / description
      Removed value: -"A to process"
    • removedInput schema / properties / p / description
      Removed value: -"P to process"
  2. Changed2 schema fields changed
    • addedInput schema / properties / a
      Added value: +{
      +  "description": "A to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / p
      Added value: +{
      +  "description": "P to process",
      +  "type": "string"
      +}
  3. First observed

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the algorithm (Euler criterion), the edge case (true when a mod p is 0) and the failure condition (errors if p<2), plus a billing note ('5 free trial calls per signed wallet'). It omits the return shape and, critically, makes no statement about primality requirements or behavior when p is composite.

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?

Effectively one dense sentence: purpose, method, edge case, error and pricing are packed without filler. The leading 'Is Quadratic Residue:' restates the tool name and is mildly redundant, but the rest is front-loaded and earns its place.

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?

For a simple two-parameter predicate with no annotations and no output schema, the description covers purpose, method, edge case and error, which is close to sufficient. It still leaves the string/big-integer input format and the primality precondition undefined, which are exactly the details an agent would need to call it correctly.

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 two string parameters, so the description must compensate. It does define the roles of a (candidate residue) and p (modulus), but never explains why they are strings (presumably big integers) or what format is accepted, leaving the most error-prone aspect undocumented.

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 precise verb and predicate ('Checks whether a is a quadratic residue mod p') plus the method used (Euler criterion), so an agent knows exactly what the boolean result means. It does not name or contrast with the closely related sibling x402-legendre-symbol, so sibling differentiation is left implicit.

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?

There is no when-to-use or when-not-to-use guidance and no alternative tool named, which matters in a catalog containing x402-legendre-symbol, x402-is-primitive-root and hundreds of other x402-is-* predicates. The error condition 'p<2' hints at input constraints but is a behavioral fact, not routing 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