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. Price: $0.001 USDC per successful call (x402, 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.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, non-destructive, open-world), and the description still adds meaningful context: input validation of verifier length/characters and redirect URIs, that state and nonce are randomly generated, the returned values to persist, plus pricing ($0.001 USDC via x402 on Solana) and a same-function HTTPS endpoint. The one tension is that random generation yields different outputs per call while annotations declare idempotentHint=true; the description surfaces the randomness, so this is disclosed rather than contradicted. It does not say what verify returns or how validation failures are reported.

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

Conciseness3/5

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

The purpose is front-loaded in the first clause, but the body is a single dense run-on with nested parentheticals that mixes three modes, validation rules, pricing, and an alternate transport. Every fact is relevant, yet per-mode structuring would make it much faster to scan.

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?

For a 12-parameter tool with low schema coverage, no output schema, and a nested `extra` object, the description covers the essential call paths and return-value expectations for generate and authorize-url. The main omission is verify-mode behavior (boolean result vs. mismatch details) and default values like mode=generate, which the schema supplies.

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?

Schema description coverage is only 25% across 12 parameters, so the description carries most of the burden and does so well: it names mode semantics, code_verifier/challenge/method, state, nonce, response_type, client_id, redirect_uri, scope, extra parameters, and verifier length bounds. Gaps remain — it never names authorizationEndpoint explicitly, does not tie each parameter to its mode, and says nothing about the 'plain' method option.

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 description gives a specific resource (OAuth 2.0 PKCE, RFC 7636 / OAuth 2.1) and enumerates the three concrete operations: generate a code_verifier/challenge/state/nonce, verify a verifier against a challenge, and build a complete authorization URL. No sibling tool in the catalog does anything similar, so the agent can distinguish it immediately.

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?

It clearly states what each mode accomplishes and what to keep afterward ("return the verifier / state to keep for the token exchange"), which gives useful operational context. It does not explicitly say when to prefer one mode over another or outline the generate → authorize-url → verify sequence, but since there are no competing alternatives in the catalog this is a minor gap.

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