Skip to main content
Glama

base64_decode

Decode Base64 or Base64url strings to plaintext UTF-8. Inspect encoded payloads, credentials, or embedded data. Accepts standard (+/) and URL-safe (-_) alphabets with optional padding. Returns decoded string or error on invalid input.

Instructions

Decode a Base64 or Base64url string back to its original UTF-8 plaintext. Use to inspect encoded payloads, credentials, or embedded data; accepts both standard (+/) and URL-safe (-_) alphabets, with or without trailing = padding. Pure local decode with no network calls; validates that the result is valid UTF-8. Returns the decoded string on success. On failure (invalid Base64 or non-UTF-8 bytes), returns an error message describing what went wrong.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesBase64 or Base64url encoded string to decode. Trailing = padding is optional. Both standard (+/) and URL-safe (-_) alphabets are accepted.
Behavior5/5

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

With no annotations, the description fully covers behavior: it is a pure local decode with no network calls, validates UTF-8, and returns either decoded string or error message on failure (invalid Base64 or non-UTF-8 bytes).

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 sentences that first state purpose, then usage and format details, then behavior and error handling. No wasted words, well front-loaded.

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?

For a simple tool with one parameter and no output schema, the description is comprehensive. It covers input format, decoding process, validation, output type, and error cases.

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 schema already provides a complete description of the 'input' parameter (100% coverage), including acceptable alphabets and optional padding. The description does not add new parameter-specific details beyond what the schema offers.

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 the action ('Decode a Base64 or Base64url string'), the resource, and the output ('original UTF-8 plaintext'). It distinguishes itself from the sibling 'base64_encode' by being the inverse operation.

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 explicit use cases ('inspect encoded payloads, credentials, or embedded data') and mentions acceptance of both alphabets and padding. However, it does not explicitly mention when not to use it or alternatives beyond the reverse operation.

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/hikmahtech/drwhome'

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