Skip to main content
Glama

Encode or decode Base64

base64_codec
Read-onlyIdempotent

Encode UTF-8 text as Base64, or decode Base64 and data URIs. URL-safe output uses - and _ and omits padding. Decode reports the sniffed media type and whether the bytes are UTF-8 text.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "base64_codec"
  }
}

Input Schema

NameRequiredDescriptionDefault
mimeNotext/plain;charset=utf-8
textYesText to encode, or Base64 or a data URI to decode.
actionNoencode
dataUriNo
urlSafeNoEncode with the URL-safe alphabet and no padding. Data URIs stay on the standard alphabet.

Output Schema

NameRequiredDescriptionDefault
okYes
mimeYes
errorYes
binaryYes
outputYes
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and closed-world, so the safety profile is covered. The description adds real behavioral detail beyond them: the URL-safe alphabet specifics (uses - and _, omits padding), that data URIs stay on the standard alphabet, and that decode reports the sniffed media type and UTF-8-ness of the bytes.

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?

Three short sentences, front-loaded with the core encode/decode split, then the URL-safe caveat, then the decode return behavior. No filler or redundancy.

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?

For a simple, side-effect-free codec with an output schema covering return values, the description is nearly sufficient: input scope and output interpretation are both addressed. The one real omission is what mime does and when to set dataUri, which a caller has to infer.

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 40%, so the description needs to compensate somewhat. It clarifies urlSafe semantics and implies the action enum through 'encode ... or decode', but the mime parameter and the dataUri flag are never explained anywhere, leaving genuine gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource pair ('Encode UTF-8 text as Base64, or decode Base64 and data URIs'), so both directions of the tool are unambiguous. It does not name the closest sibling, url_codec, so an agent must still reason about Base64 vs URL encoding on its own.

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?

Scope is implied by 'Encode UTF-8 text... or decode Base64 and data URIs', and the URL-safe sentence steers the urlSafe choice, but there is no explicit when-to-use / when-not guidance and no mention of how this differs from url_codec or decode_jwt.

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.