jwt_decode
Decode a JWT and optionally verify its HMAC signature, returning header, payload, algorithm, and signature verification status.
Instructions
Decode a JWT and (optionally) verify the HMAC signature.
Pure compute, no outbound network. When secret is provided we verify
HS256/HS384/HS512 signatures; without it we just decode and return the
header and payload. The original token is never logged.
Args:
token: Full JWT string (three dot-separated base64url segments)
secret: Optional HMAC secret. If supplied, signature_verified
will be True only if the signature matches.
Returns: dict with keys: header, payload, algorithm, signature_verified, valid
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": {
"token": "<token>"
},
"name": "jwt_decode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | ||
| secret | No |