Skip to main content
Glama

ScorpTech x402 Tools

Jwt Sign

jwt_sign
Read-onlyIdempotent

Create or verify HMAC-signed JWTs (HS256 / HS384 / HS512) — for test fixtures, service-to-service tokens, webhook auth and debugging "invalid signature" errors. sign: builds header + claims with iat / exp / nbf from durations ("15m", "1h", "7d"), iss / sub / aud shortcuts and an optional random jti, and returns the compact token. verify: checks the signature in constant time plus exp / nbf / iat with leeway and optional issuer / audience expectations, and explains exactly why a token fails. The secret can be UTF-8, base64, base64url or hex; it is never echoed or stored. Warns when the secret is shorter than the hash (RFC 7518 §3.2). For RS / ES / EdDSA token decoding and JWKS verification use /v1/jwt-decode. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/jwt-sign

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": {
      "secret": "<secret>"
    },
    "name": "jwt_sign"
  }
}

Input Schema

NameRequiredDescriptionDefault
algNoHS256
iatNosign: add iat
jtiNosign: add a random jti (UUID v4)
nowNoUnix time to treat as "now" (default: server time)
modeNosign
tokenNoverify: the compact JWT
claimsNosign: payload claims (JSON object)
headerNosign: extra header fields, e.g. {"kid": "k1"}
issuerNo
leewayNoverify: clock-skew allowance in seconds
secretYesHMAC secret (never echoed)
subjectNo
audienceNo
expiresInNosign: exp = now + duration ("900", "15m", "1h", "7d")
notBeforeNosign: nbf = now + duration
secretEncodingNoutf8

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Although annotations already declare read-only, idempotent, non-destructive behavior, the description adds substantive operational context: the secret is never echoed or stored, verification is constant-time, leeway is supported, short-secret warnings follow RFC 7518, and failed verification explains why. This is useful beyond the structured annotations.

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?

The description is dense but front-loaded: purpose first, then mode-specific behavior, encoding details, security warning, alternative tool, and access/pricing context. Despite its length, every clause provides operational value for a complex 16-parameter tool.

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 high-complexity tool with nested claims/header objects and no output schema, the description explains what sign returns (compact token) and what verify returns conceptually (signature and time-claim validation with failure reasons). The main behavioral and invocation expectations are covered.

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?

With 63% schema description coverage over 16 parameters, the description meaningfully supplements the schema by explaining duration formats for iat/exp/nbf, iss/sub/aud shortcuts, random jti, secret encodings, and verify-time issuer/audience expectations. It does not explain every parameter in depth, but it compensates well for the coverage 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?

The description uses a specific verb and resource: create or verify HMAC-signed JWTs across HS256/HS384/HS512. It clearly distinguishes the sign and verify modes and names the sibling alternative for RS/ES/EdDSA/JWKS use, so an agent can route correctly without inspecting 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 Guidelines5/5

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

It gives concrete use cases (test fixtures, service-to-service tokens, webhook auth, debugging invalid signatures) and explicitly directs non-HMAC/JWKS needs to /v1/jwt-decode. The sign/verify behavior is also outlined with enough context to select the right mode.

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