Skip to main content
Glama

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. Price: $0.001 USDC per successful call (x402, 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.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive). The description adds genuinely non-schema information: a $0.001 USDC per-successful-call price via x402 on Solana, and an equivalent HTTPS endpoint. It does not describe the return format, but the pricing/payment disclosure is the valuable addition here.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core definition, then compact examples that each disambiguate an edge case (gap, zero-present, empty), followed by bounds and pricing. No sentence is filler.

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

Completeness4/5

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

With no output schema, the description should imply the return type; it does so only indirectly through examples (a single integer). Everything else an agent needs to call correctly — bounds, cost, alternate transport — is present.

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?

The single parameter 'values' is fully constrained by the schema (integer items 0-1000, maxItems 64), and the description restates those same bounds rather than adding new semantics. Because the input meaning is self-evident from the worked examples, the lack of extra parameter detail is a minor 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?

States a specific operation (compute the mex) and immediately defines the term with three worked examples, so an agent knows exactly what is produced. Against a sibling list of hundreds of math functions, this definition is self-disambiguating.

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 definition makes the applicable case obvious (a list of nonnegative integers under 64 elements), but there is no explicit 'use this instead of X' routing and no statement of when not to call it. Usage is implied by the definition rather than 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