Skip to main content
Glama

security-crypto

jwt_decode_and_audit

Decode JWT header & payload, flag alg=none / weak secrets / expired exp claims, and optionally verify HS256/HS512 signatures.

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

Input Schema

NameRequiredDescriptionDefault
textNo
tokenNo
hmacSecretNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the audit checks performed and the important limitation that only HS256/HS512 verification is supported, but it omits whether the tool is purely local/read-only, what counts as a 'weak secret', and what the output looks like.

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?

A single front-loaded sentence that packs the decode action, the three audit checks, and the optional verification mode with no filler or repetition.

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?

No annotations and no output schema mean the description must carry everything. It covers what is checked and the supported algorithms adequately, but leaves the text-vs-token distinction and the shape of the audit findings unexplained for a three-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must disambiguate the three parameters. It only indirectly explains hmacSecret (via 'optionally verify'), and never clarifies the difference between 'text' and 'token' or which one carries the JWT — a significant ambiguity for an agent filling the schema.

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 names a specific resource (JWT header & payload) and concrete actions (decode, flag risky conditions, optionally verify signatures), and the checks it lists (alg=none, weak secrets, expired exp) clearly separate it from siblings like saml_assertion_decode or hmac_sign_and_verify.

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?

Usage is implied rather than stated: 'optionally verify HS256/HS512 signatures' signals that verification only happens when a secret is supplied, but there is no explicit when-to-use/when-not guidance or routing to alternatives such as hmac_sign_and_verify for the signing side.

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