Skip to main content
Glama

ScorpTech x402 Tools

Oauth Pkce

oauth_pkce
Read-onlyIdempotent

OAuth 2.0 PKCE helper (RFC 7636 / OAuth 2.1): generate a code_verifier with its S256 code_challenge plus random state and OIDC nonce, verify that a verifier matches a challenge, or build a complete authorization URL (response_type=code, client_id, redirect_uri, scope, state, nonce, code_challenge, extra parameters such as prompt or audience) and return the verifier / state to keep for the token exchange. Validates verifier length and characters and redirect URIs. Returns JSON with: mode, verifier, challenge, method, state, nonce, url, params. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/oauth-pkce

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": "oauth_pkce"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNogenerate
extraNoauthorize-url: additional query parameters, e.g. {"prompt": "consent", "audience": "api"}
scopeNo
stateNoauthorize-url: state to use (default: random)
lengthNogenerate: verifier length
methodNoS256
clientIdNo
verifierNo
challengeNo
redirectUriNo
responseTypeNocode
authorizationEndpointNo

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?

Goes well beyond the annotations by disclosing validation rules (verifier length/characters, redirect URI checks), the exact return fields, and an unusual operational constraint: $0.001 USDC per successful call via x402 on Base or Solana, plus an HTTPS endpoint alternative. One tension: annotations declare idempotentHint=true, yet generate mode explicitly produces random verifier/state/nonce, so repeat calls differ — the description implies this without flagging the exception, which keeps it out of contradiction territory but is worth noting.

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?

Dense but well front-loaded: the three operations come first, followed by validation behavior, return shape, and pricing. It is a single long paragraph rather than a structured list, which costs some scannability for a 12-parameter, 3-mode tool, but no sentence is filler.

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?

Compensates for the absent output schema by listing exactly which JSON keys are returned, and covers pricing and the HTTPS fallback. The real gap is per-mode parameter requirements: with zero required parameters in the schema, an agent must guess which fields are mandatory for verify versus authorize-url, which is where most invocation errors would occur.

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?

With only 25% schema description coverage across 12 parameters, the description does meaningful compensating work by naming client_id, redirect_uri, scope, state, nonce, code_challenge and the extra-params bag. However it says nothing about method (S256/plain), length bounds, authorizationEndpoint, responseType, or which parameters each mode actually consumes, leaving roughly half the surface to inference.

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?

Names the specific resource (an OAuth 2.0 PKCE helper, RFC 7636 / OAuth 2.1) and enumerates three concrete operations: generate a verifier with S256 challenge/state/nonce, verify a verifier against a challenge, and build an authorization URL. The verb-plus-resource specificity means an agent knows exactly what it is calling without opening 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'or' construction maps each operation to its purpose, and the schema's mode enum (generate/verify/authorize-url) aligns with that framing, so an agent can pick a mode from the description alone. It stops short of stating prerequisites per mode (e.g. that verify needs both verifier and challenge, authorize-url needs clientId and redirectUri), but no alternatives or exclusions are needed here given the sibling set is unrelated.

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