jwt_decode
Decode a JWT header + payload. Does not verify the signature.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes |
Decode a JWT header + payload. Does not verify the signature.
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden, and it discloses the single most safety-relevant trait: no signature verification, meaning the payload is unauthenticated data. It omits error behavior on malformed tokens and any statement about whether the operation is a pure read, which are smaller gaps for a stateless decode function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, zero waste, with the positive capability stated first and the critical caveat immediately after. Nothing needs trimming or reordering.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter, no-output-schema tool this covers what is returned (decoded header + payload) and the key trust caveat. A brief note on the shape of the result or behavior on invalid input would make it fully self-sufficient without an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for the single 'token' parameter, so the description must compensate. It implies the input is a JWT (by naming header and payload) but adds no format detail, no example, and no note on whether the token may include the 'Bearer ' prefix.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (decode) and resource (JWT header + payload), and scopes the operation precisely to the two decoded segments. This is immediately distinguishable from the neighboring base64_decode/url_decode tools, which operate on opaque strings rather than JWTs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The sentence 'Does not verify the signature' gives the agent an explicit condition under which the output must not be trusted, which functions as an implicit when-not-to-use signal. It stops short of naming an alternative (e.g., a verify/validate tool) or stating a positive use case such as debugging or inspecting claims.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.