Skip to main content
Glama

ScorpTech x402 Tools

Mex

mex
Read-onlyIdempotent

The mex of a list: the smallest missing nonnegative integer. The mex of 0, 1, 3 is 2. The mex of 1, 2, 3 is 0. The mex of an empty list is 0. The list has at most 64 integers, each from 0 to 1000. Returns JSON with: value. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/mex

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": {
      "values": "<values>"
    },
    "name": "mex"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/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 safety is covered. The description adds genuinely new behavioral context: a per-call price ($0.001 USDC via x402 on Base or Solana), an equivalent HTTPS endpoint, and the return shape ("Returns JSON with: value"), which annotations cannot convey.

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 definition and edge cases are front-loaded and each example earns its place by pinning down a different corner of the behavior (missing middle value, list starting above 0, empty list). The pricing and endpoint sentence is compact, though the three parallel example sentences could have been tightened into fewer lines.

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 one-parameter pure function with no output schema, the description supplies everything needed: exact semantics, worked examples, input bounds, cost, and the shape of the returned JSON. Nothing material is missing for an agent to invoke 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%, so the description must carry the burden for the single "values" parameter. It does describe the input domain in prose (a list of nonnegative integers, at most 64, each 0-1000) and the empty-list edge case, but this largely restates the array/maxItems/minimum/maximum constraints already encoded in the schema rather than adding new semantics.

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 mex of a list: the smallest missing nonnegative integer" is a precise verb-free but definitionally exact statement of the resource, and the three worked examples (0,1,3 -> 2; 1,2,3 -> 0; empty -> 0) remove any ambiguity. An agent can distinguish this from other number-theory siblings purely from the definition.

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?

The description implicitly tells when the tool applies by defining mex exactly and by bounding the input (at most 64 integers, each 0-1000), which functions as a callable precondition. However, it never states when to prefer this over alternatives or what happens when the bound is exceeded, leaving the agent to infer.

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