Skip to main content
Glama

Decode base64 to text

decode-base64-to-text
Read-onlyIdempotent

Use when you need to read base64 as text. Decodes standard base64 to UTF-8 text and refuses anything that is not valid base64 or not valid UTF-8, rather than guess. $0.01 USDC on Base per answer via x402; a refusal is free.

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": "decode-base64-to-text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesBase64 that decodes to UTF-8 text: the letters A to Z and a to z, the digits 0 to 9, + and /, then one or two = of padding at the end, which may be left out but, when given, must make the length a multiple of four. A length that leaves one character over a multiple of four is refused. White space anywhere is ignored and not counted in the length. At most 1,048,576 bytes of UTF-8, white space included.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/closed-world annotations, the description discloses the refusal contract ('refuses anything that is not valid base64 or not valid UTF-8, rather than guess') and the payment model ($0.01 USDC on Base via x402, refusal free) - both material to an agent deciding whether and how to call it.

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, front-loaded with the use condition, followed by behavior and cost. No filler, no restatement of the title, and every clause carries information an agent needs.

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 one fully documented parameter, rich annotations and no output schema, the description covers purpose, failure modes and cost. The one remaining gap is the response shape - whether the result is bare text or wrapped with metadata - which has to be inferred because no output schema exists.

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% and the parameter description already documents the alphabet, padding rules, length constraint and the 1 MiB cap in detail, so the baseline is 3. The description adds meaning on top by emphasizing 'standard' base64 and stating that non-UTF-8 input is refused rather than coerced, which the schema does not explicitly say.

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 verb and resource ('Decodes standard base64 to UTF-8 text') and pins down the variant by saying 'standard base64' rather than url-safe, which lets an agent distinguish it from a base64url decoder 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?

'Use when you need to read base64 as text' gives a clear triggering condition, and the refusal clause implicitly scopes out binary payloads and malformed input. It stops short of naming an alternative tool or saying what to do when the input is not UTF-8, so it is clear context without full when/when-not routing.

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