Skip to main content
Glama
cyberdroid2077

opsecforge-mcp

Decode a JWT and flag risks

inspect_jwt
Read-onlyIdempotent

Decode a JWT locally to inspect header, claims, time claims and risk notes; signature is not verified. Use token_env to keep the raw token out of model context.

Instructions

Decodes a JWT locally and returns its header, claims (field values whose names look like secrets are masked), time-claim status (exp, nbf, iat) and risk notes such as alg none, HMAC algorithms that cannot be verified offline, missing exp, and jku/jwk/x5u key-injection headers. DECODING IS NOT VERIFICATION: this tool has no key, never checks the signature and cannot tell you the token is genuine. Prefer token_env (the NAME of an environment variable) so the raw token does not pass through the model; a token passed as token is already in the context. The claims returned are in the model context either way.

Input Schema

NameRequiredDescriptionDefault
tokenNoThe JWT itself. Passing it here puts it in the model context; use token_env when possible.
token_envNoNAME of an environment variable that holds the JWT. Preferred: the raw token then never passes through the model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Goes far beyond the readOnly/idempotent annotations: it states the tool holds no key, never checks the signature, cannot confirm the token is genuine, masks secret-looking claim names, and flags specific risk classes (alg none, HMAC, missing exp, jku/jwk/x5u). It also discloses the side effect that claims end up in the model context.

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?

Front-loads the capability, then the critical non-verification caveat, then the parameter guidance. Every sentence carries a distinct, actionable fact with no padding.

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?

With no output schema, the description fully describes the return shape (header, claims, time-claim status, risk notes) and the handling caveat. Nothing needed to call this correctly is missing.

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?

Schema description coverage is 100% and the two schema descriptions already state the token-in-context tradeoff verbatim, so the description mostly restates structured data. It reinforces the token_env preference but adds no new syntax, format, or constraint beyond 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?

States a specific verb+resource ('Decodes a JWT locally') and enumerates the precise output: header, masked claims, time-claim status, and risk notes. An agent can distinguish it from scan_secrets or verify_webhook without opening any 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?

Explicitly frames the decoding-vs-verification boundary and steers parameter choice ('Prefer token_env... a token passed as `token` is already in the context'). It stops short of naming a sibling to use instead when actual verification is needed, leaving that inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.