Skip to main content
Glama

base64hub

Base64 decode

base64_decode
Read-onlyIdempotent

Decode Base64 back to text. Accepts the standard and the URL-safe alphabet (even mixed), missing '=' padding, spaces and line breaks, and data URIs such as data:image/png;base64,... Returns the decoded UTF-8 text exactly. If the bytes are not valid UTF-8 (an image, compressed or encrypted data), says so and returns them as hex instead. Invalid input fails with the reason and the position of the offending character.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "data": "<data>"
    },
    "name": "base64_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesBase64 text or a data: URI.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses accepted alphabets, padding and whitespace tolerance, data URI support, exact UTF-8 return behavior, hex fallback for non-UTF-8 bytes, and detailed error reporting with character position.

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 definition is four tight sentences, front-loaded with the core action and then progressively detailing accepted input and return behavior. Every sentence contributes useful information without repetition.

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?

Although there is no output schema, the description fully explains return semantics: decoded UTF-8 text normally, hex for non-UTF-8 bytes, and descriptive error positions for invalid input. Nothing needed to invoke or interpret the tool is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents the single 'data' parameter. The description still adds useful meaning by enumerating what input forms are accepted, including mixed alphabets, missing padding, and data URIs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Decode Base64 back to text.' An agent can immediately distinguish this from encode or validate siblings by function, although it never names those siblings explicitly.

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

Usage Guidelines3/5

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

Usage is implied by the decode function rather than stated. There is no explicit guidance about when to choose this tool over base64_validate or when not to use it, such as for non-text payloads.

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