Skip to main content
Glama

Base64 decode

base64_decode
Read-onlyIdempotent

Decode Base64 text, including URL-safe and data URI inputs, to return UTF-8 content inline or write binary output to a file with the detected extension.

Instructions

Decode Base64 (standard or URL-safe, padding optional, whitespace and data: URI prefix allowed). Valid UTF-8 text is returned inline; binary data (or anything when "output" is given) is written to a file whose extension comes from the detected type (PNG, JPEG, GIF, WebP, BMP, PDF, ZIP, gzip, MP3, Ogg, MP4, WOFF2, SVG, JSON). Web version: https://s3eidat.github.io/base64-kit/

Input Schema

NameRequiredDescriptionDefault
base64YesThe Base64 text to decode (may be a data: URI).
outputNoWhere to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set).
fileNameNoBase name for the written file (extension follows the detected type). Default "decoded".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Goes well past the annotations by disclosing the real side effect: binary results are written to disk with a detected extension, with a default temp output folder. Worth noting the mild tension with readOnlyHint=true, since file creation is a side effect, but the description discloses it rather than hiding it, so no real contradiction. It omits error behavior for invalid input.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the decode scope, then the all-important output-destination rule, so the reader gets the decision-relevant facts first. The second sentence is long because of the detected-type list, which is justified but slightly bloats the entry.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so: inline UTF-8 text versus a written file whose extension reveals the detected type. Only gap is failure behavior on malformed Base64 and whether existing files at the target path are overwritten.

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 coverage is 100%, so all three parameters are already documented, and the description's default-folder and extension-detection notes largely mirror the schema's "output" and "fileName" text. Baseline 3 applies; the description adds behavior around the parameters rather than new meaning within them.

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?

Specific verb+resource ("Decode Base64") with the scope of variants spelled out: standard or URL-safe, optional padding, whitespace and data: URI prefix accepted. An agent can distinguish this from base64_encode and image_from_base64 without opening a schema.

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?

The description gives clear operating context: text decodes inline, binary (or anything with an explicit "output") goes to a file. It does not name alternatives, and the nearest overlapping sibling, image_from_base64, is never mentioned, so an agent must infer which one to pick when the payload is an image.

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

Deploy Server

Other Tools