Skip to main content
Glama

ScorpTech x402 Tools

Mod Inv

mod_inv
Read-onlyIdempotent

The modular inverse of a modulo m, as a residue from 0 up to m-1. The modulus must be at least 1. A value that is not coprime to m is rejected. Returns JSON with: value, mod. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/mod-inv

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>",
      "mod": "<mod>"
    },
    "name": "mod_inv"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes
modYes

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?

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: an explicit rejection rule for non-coprime inputs, the normalized output range, the returned JSON keys (value, mod), and a per-call price with payment rails and an HTTPS endpoint. Error semantics and cost transparency are exactly the kind of detail annotations cannot carry.

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 behavioral facts come first (result range, input constraints, rejection rule), then return shape, then cost and transport. Each sentence carries information, though the pricing and endpoint sentence reads as appended boilerplate rather than being integrated into the flow.

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 two-parameter pure computation with no output schema, the description covers result semantics, the normalization range, failure conditions, and the exact return keys, plus cost and an alternate transport. Nothing an agent needs in order to call this correctly and interpret the response is missing.

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%, so the description must carry parameter meaning, and it partly does: 'm' is constrained to at least 1 and 'a' must be coprime to the modulus, which maps to the two required parameters. It never mentions that both inputs are decimal strings up to 200 digits, so the arbitrary-precision input format is left entirely to the regex patterns.

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?

The description states a precise computation: the modular inverse of a modulo m, normalized to the residue range 0..m-1. That is a specific verb+resource rather than a restatement of the name. It stops short of distinguishing itself from the near-named mod_inverse sibling, but the residue-range normalization is at least a concrete differentiator in its own right.

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 boundaries are expressed as preconditions (modulus must be at least 1; non-coprime values are rejected) rather than as when-to-use/when-not guidance. An agent can infer the tool fails on bad input, but nothing tells it when this is preferable to a related modular-arithmetic tool.

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