Skip to main content
Glama
matetools

@mate-tools/mcp-server

Official
by matetools

jwt_decode

Decode JSON Web Tokens and analyze claims: returns header, payload, signature, and expiry status. Optionally verify HS256/384/512 with a secret or RS256/384/512 with a PEM key.

Instructions

Decode a JSON Web Token (JWT) and analyse its claims. Always returns header, payload, signature info, and expiry status (active/expired/not_yet_valid) computed from exp/nbf/iat. When secret is provided, verifies HS256/HS384/HS512 via HMAC. When public_key is provided in PEM format, verifies RS256/RS384/RS512 via openssl_verify. ES* and EdDSA are decoded but not verified. The token is never logged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesFull JWT (three base64url segments joined with dots). "Bearer " prefix is stripped automatically.
secretNoShared secret for HS256/384/512 verification. Optional.
public_keyNoPEM-format RSA public key for RS256/384/512 verification. Optional.
Behavior5/5

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

With no annotations, the description carries full burden and excels: it discloses algorithm-specific verification, the automatic Bearer prefix stripping, always-returned expiry status, the fact that ES*/EdDSA are decoded but not verified, and that the token is never logged. This is comprehensive behavioral disclosure.

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?

Two dense sentences, front-loaded with the primary purpose, then precisely covering verification modes and a key operational detail (no logging). Every clause earns its place; no fluff.

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?

Despite having no output schema, the description fully explains return values and behavioral nuances. It covers all aspects an agent needs: what is returned, when verification happens, algorithm limitations, and security posture. Complete for the tool's complexity.

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%, so the schema already documents all three parameters. The description adds no significant new semantic detail beyond what's in the schema, meriting the baseline score.

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 clearly states it decodes and analyzes JWTs, a specific verb+resource. It elaborates on the return structure (header, payload, signature info, expiry status) and verification capabilities, fully distinguishing it from sibling utility tools.

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?

Provides clear guidance on when to use secret vs. public_key and which algorithms are verified vs. only decoded. Implicitly differentiates from other tools by specifying JWT-specific functionality, though it doesn't explicitly mention alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matetools/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server