Skip to main content
Glama
crisjonblvx

enrichrapi-mcp

by crisjonblvx

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYes
secretNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries full behavioral burden, and it delivers: it discloses 'Pure compute, no outbound network,' that 'The original token is never logged,' which algorithms are verified, and precisely how signature_verified will be set. This goes well beyond the schema.

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 compact, front-loaded, and well-structured with Args and Returns sections. Every sentence adds useful information, and there is minimal redundancy.

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?

Given two simple parameters, no annotations, and no output schema, the description covers both parameters and explicitly lists all return keys. An agent has everything needed to call the tool correctly and interpret its result.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does thoroughly. It defines token as a 'Full JWT string (three dot-separated base64url segments)' and explains the exact semantic effect of providing optional secret. This adds real meaning beyond the bare schema properties.

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 opens with a specific verb and resource: 'Decode a JWT and (optionally) verify the HMAC signature.' This clearly differentiates the tool from other validation/enrichment siblings by naming the exact operation and the optional verification mode.

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?

The description clearly implies when to use it: whenever a JWT needs decoding or signature verification. It also clarifies the conditional behavior with and without a secret, which is strong usage context, though it does not explicitly name alternatives or exclusions.

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