Skip to main content
Glama

Base64 encode

base64_encode
Read-onlyIdempotent

Encode UTF-8 text or files to Base64 with URL-safe alphabet, MIME 76-column wrapping, or data URI output. Large results are written to a file instead of returned inline.

Instructions

Encode text (as UTF-8) or a file (path or base64) to Base64. Options: URL-safe alphabet (- and _, no padding), wrap at 76 columns (MIME), or a data: URI for files (MIME type detected from magic bytes). Results over 1 MB, or when "output" is given, are written to a text file instead of returned inline. Web version: https://s3eidat.github.io/base64-kit/

Input Schema

NameRequiredDescriptionDefault
fileNoOr: a file to encode: local path or base64 data.
textNoText to encode (UTF-8).
wrapNoInsert a line break every 76 characters (MIME style).
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).
dataUriNoReturn a data: URI (data:<mime>;base64,…) instead of bare Base64.
urlSafeNoUse the URL-safe alphabet (- and _) and drop "=" padding.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior1/5

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

The annotations declare readOnlyHint=true, but the description states that results over 1 MB or when "output" is given are written to a text file. Writing files is a mutating side effect and directly contradicts the read-only 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?

The description is compact, front-loaded, and covers the main behavior in one dense paragraph. The external web-version link is not essential for invocation and slightly weakens conciseness.

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 usefully explains that output is returned inline or written to a file, including the 1 MB threshold. It does not clarify precedence if both text and file are supplied, which is a minor completeness gap.

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 parameters are already documented, but the description adds useful semantics beyond the schema: the 1 MB inline/file-output threshold and MIME type detection from magic bytes for data URIs. Some option descriptions merely restate schema text, so it stops short of 5.

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 gives a specific verb and resource: encode text (UTF-8) or a file to Base64. It clearly distinguishes the operation from the sibling base64_decode and from image-only base64 helpers by naming text and file-path inputs.

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?

It explains when the option flags apply: URL-safe alphabet, MIME wrapping, data URI output, and file output. It does not explicitly compare against alternatives such as base64_decode or image_to_base64, but the usage context is clear.

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