Skip to main content
Glama

Encode or decode a local Base64 file

abox_base64

Encodes local file bytes to Base64 text or decodes Base64 into a binary file, with padded, URL-safe, and strict or relaxed decoding options.

Instructions

Encode arbitrary local file bytes as Base64 text or decode Base64 into a new binary file using the existing abox.tools byte codec. Supports standard padded or URL-safe unpadded encoding. Relaxed decoding accepts whitespace, either alphabet and missing padding; canonical decoding requires the requested exact spelling and zero unused bits. Supports empty files, verifies a byte round trip, and never returns file contents.

Input Schema

NameRequiredDescriptionDefault
modeYes
url_safeNo
canonicalNo
input_pathYesAbsolute local filesystem path. URLs and network shares are refused.
output_pathYesAbsolute local filesystem path. URLs and network shares are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.3/5.0
Behavior4/5

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

Adds real value beyond annotations: it verifies a byte round trip and 'never returns file contents', so an agent knows the result is a file on disk, not data in the response. It also notes local-path-only scope. It does not say whether an existing output file is overwritten, which matters given destructiveHint=false.

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-loads what the tool does, then the encoding variants, then behavioral guarantees. Dense but every clause carries information; the relaxed/canonical clause is compact but slightly jargon-heavy for an agent skimming.

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?

A 5-parameter, no-output-schema mutation tool that mostly covers what's needed: writes a file, returns no contents, round-trip verified. The remaining gap is overwrite/error behavior on the output path, which the annotations alone don't settle.

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 only 40%, with url_safe and canonical undocumented in the schema, but the description compensates: url_safe is mapped to 'standard padded or URL-safe unpadded' and canonical to 'exact spelling and zero unused bits'. This is exactly the semantic gap-filling expected at low coverage; the path parameters rely on their schema descriptions.

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 specific verbs (encode/decode) and resources (local file bytes -> Base64 text, Base64 -> new binary file). No sibling tool shares this resource, and the bidirectional scope is clear enough that an agent can pick it over abox_file_hash or abox_image_data_uri.

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?

Explains the two operating modes and the condition selecting relaxed vs canonical decoding ('relaxed accepts whitespace, either alphabet and missing padding; canonical requires the requested exact spelling'). It gives clear context but never states exclusions or when to prefer a different tool (e.g., for hashing vs encoding).

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