Skip to main content
Glama

Razi Dev Utilities

decode_base64

Decode a Base64 string back to UTF-8 text. Returns JSON { decoded }. Input is verified by re-encoding, so anything that is not genuine Base64 is rejected with an error instead of returning plausible garbage; binary payloads that are not valid UTF-8 will also fail. It handles Base64 and nothing else: a string of %20-style percent escapes is not Base64 and will be rejected rather than unescaped. For a JWT use decode_jwt, which splits the three segments and handles their base64url padding for you.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encodedYesStandard Base64 text. Surrounding whitespace and missing '=' padding are tolerated; the URL-safe alphabet (- and _) is not.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses the return shape, the re-encoding validation behavior, the UTF-8 constraint, and the rejection of non-Base64 input. This is thorough and prevents false expectations.

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?

Three concise sentences with no wasted words. The main purpose is front-loaded, followed by validation behavior, then exclusion and alternative routing. Every sentence adds value.

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?

Complete for a simple one-parameter utility. It explains the return format, failure modes for invalid input and binary data, and how to choose an alternative tool. Nothing an agent needs to call it 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?

The input schema already documents the only parameter in detail, including whitespace tolerance, padding behavior, and URL-safe alphabet exclusion. The description reinforces this but adds little new parameter-level meaning beyond what the schema provides.

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 and resource ('Decode a Base64 string back to UTF-8 text') and clearly differentiates itself from the sibling decode_jwt. An agent can immediately tell this tool is for raw Base64 decoding, not JWT handling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'For a JWT use decode_jwt' and warns that percent-escape strings are not Base64 and will be rejected. This gives the agent both positive and negative usage guidance and names the alternative tool.

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