Skip to main content
Glama

Base64 Encode / Decode API - text or files

base64_encode_decode
Read-onlyIdempotent

Encode text or a file to Base64 or decode Base64 back, with URL-safe variant. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/base64-encode-decode.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "encode",
      "text": "hello"
    },
    "name": "base64_encode_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoencode or decodeencode
textNoThe text
filesNoOr several files: [{fileName, fileContent (base64)}]
urlSafeNoURL-safe alphabet (- and _)
fileNameNoFile name with extension, e.g. report.pdf
fileContentNoOr send a file as base64 (a data: URI is fine) instead of text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

Because both the description and schema describe a stateless codec, nothing is mutated and no side effects are expected. The free-tier and paid-tier details are useful but do not describe what the tool does or returns, so the description is somewhat lacking.

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 purpose is front-loaded in the first clause, followed by privacy, rate-limit and pricing detail in compact form. The pricing/URLs are dense but arguably necessary for an agent to know auth requirements; still, three URLs in one sentence is heavy.

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 a 100% covered schema and readOnly/idempotent/openWorld annotations already supplied, the description covers the missing behavioral pieces (data retention, rate limits, auth). It leaves the return shape and the precedence rules among text, fileContent and files unaddressed, which matters for a 6-parameter tool with no output schema.

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%, so the schema alone documents mode, text, files, urlSafe, fileName and fileContent. The description adds no meaning beyond that: it does not clarify the mutual exclusivity of text vs fileContent vs files, nor how mode interacts with the file parameters.

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?

States a specific verb+resource pair: encode text or a file to Base64, or decode back, plus a URL-safe variant. An agent can tell this is a Base64 codec rather than a general URL codec, though it never names the sibling alternatives (url_encode_decode, image_to_base64) that an agent might confuse it with.

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?

Usage is only implied by the encode/decode listing; there is no explicit statement of when to pick this over url_encode_decode or image_to_base64, nor what happens at the free-tier limit. The commercial/pricing sentences describe access conditions rather than when-to-use guidance.

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.

Resources