Skip to main content
Glama

Base64 / data URI to image file

image_from_base64
Read-onlyIdempotent

Decode Base64 data URIs, CSS url() rules, tags, or raw Base64 into a saved file; detects the real file type and warns if it differs from the declared one.

Instructions

Decode Base64 back into a file: accepts a data URI, a CSS url("data:…") rule, an tag, URL-encoded SVG data URIs, or raw Base64 (standard or URL-safe, line breaks allowed). Detects the real type from the bytes, warns when it differs from the declared one, and writes decoded.. Give the text inline or as a path to a text file. Web version: https://s3eidat.github.io/image-to-base64/

Input Schema

NameRequiredDescriptionDefault
pathNoOr: a text file containing it.
textNoThe data URI / CSS / <img> tag / raw Base64.
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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior1/5

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

The description explicitly says it writes decoded.<ext>, detects the real type from bytes, and warns on mismatch, but annotations declare readOnlyHint=true. A tool that writes a file cannot be read-only, so the description directly contradicts the annotation.

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?

Purpose and key input/behavior details are front-loaded and the description is reasonably sized. The web-version URL is extraneous for agent invocation and the first sentence is dense, but overall it is efficient.

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

Completeness3/5

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

It explains accepted inputs, type detection, warning behavior, and output filename, which is enough to invoke the tool. It still omits overwrite/collision behavior and return/error details for a file-writing tool, and its write behavior conflicts with the read-only annotation.

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 description coverage is 100%, and the schema already documents path, text, and output including the default output folder. The description adds accepted text-format examples and the inline-vs-path distinction but no additional semantics for output beyond what the schema provides, so baseline 3 is appropriate.

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 Base64/data URI back into a file, with accepted input variants and output filename. It is clearly distinguishable from image_to_base64 (reverse) and generic base64_decode by producing an image file and detecting the real type.

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?

It implies usage by listing accepted forms (data URI, CSS url(), <img> tag, URL-encoded SVG, raw Base64) and saying text can be inline or a file path. However, it never names alternatives such as base64_decode or image_to_base64, nor states when not to use this tool, so guidance remains implied rather than explicit.

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