Skip to main content
Glama

SimplyUtils

Base64 encode or decode

base64
Read-only

Encode text (as UTF-8) to Base64, or decode Base64 back to text, and return the result. Decoding accepts standard and URL-safe alphabets and ignores whitespace; invalid Base64 returns an error. Bytes that are not valid UTF-8 are shown as replacement characters. Input up to 100 KB.

Input Schema

NameRequiredDescriptionDefault
modeYesencode: text to Base64; decode: Base64 to text
textYesText to encode, or Base64 to decode
urlSafeNoWhen encoding, use - and _ and drop = padding (for URLs and JWTs)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / mode / description
      Added value: +"encode: text to Base64; decode: Base64 to text"
    • addedInput schema / properties / text / description
      Added value: +"Text to encode, or Base64 to decode"
    • addedInput schema / properties / urlSafe / description
      Added value: +"When encoding, use - and _ and drop = padding (for URLs and JWTs)"
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds real value beyond that: error behavior on invalid Base64, lossy replacement-character output for non-UTF-8 bytes, and a 100 KB input cap.

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?

Two sentences, no filler, and the core verb/resource is front-loaded before the edge-case caveats. Every clause carries information an agent would otherwise lack.

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?

For a simple two-mode string transform with no output schema, the description covers direction, encoding, error behavior, lossiness, and size limits. Nothing needed to call it correctly 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 baseline is 3, but the description adds semantics the schema does not: decoding auto-detects both alphabets and tolerates whitespace, clarifying that urlSafe is only meaningful on the encode path. That resolves a real ambiguity an agent would otherwise have to guess at.

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 reversible transform with both directions spelled out ('Encode text (as UTF-8) to Base64, or decode Base64 back to text'), which is unambiguous against siblings like hash_text or format_json. An agent can select this without opening the 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?

Gives concrete usage context for the decode path (accepts standard and URL-safe alphabets, ignores whitespace, errors on invalid input) and a size ceiling that tells the agent when the tool is unsuitable. It stops short of explicitly contrasting with one-way siblings such as hash_text, so no exclusion guidance is present.

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.