Skip to main content
Glama

base64hub

Base64 encode

base64_encode
Read-onlyIdempotent

Encode text to Base64. The text is converted to UTF-8 bytes first, so any language and emoji work. Set url_safe for the URL- and filename-safe alphabet (- and _ instead of + and /, as in JWTs and URLs), padding=false to drop the trailing '=' characters, and wrap to break the output into lines (76 for MIME email). Returns only the Base64 string.

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_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to encode, taken as UTF-8.
wrapNoInsert a line break after every N output characters. 0 = one line, 76 = MIME.
paddingNoAdd '=' padding at the end.
url_safeNoUse the URL-safe alphabet (- and _, RFC 4648 section 5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuine behavioral context on top: UTF-8 normalization before encoding, the exact alphabet substitution for url_safe, padding removal, and line-wrapping semantics. It stops short of noting size limits or error behavior for invalid input, keeping it below a 5.

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?

A single front-loaded paragraph that moves from core action to encoding detail to parameter hints to the return value, with no filler sentences. Every clause carries information an agent can act on.

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 small, closed-world, 4-parameter utility with no output schema, the description covers input interpretation (UTF-8), all optional flags, and the exact return shape ('only the Base64 string'). 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, and the description adds real meaning beyond it: it explains why url_safe matters (JWTs and URLs, with the concrete '+ and /' to '- and _' substitution) and ties wrap=76 to MIME email. Some of this overlaps the schema's own descriptions ('76 = MIME', 'RFC 4648 section 5'), which keeps it out of the top band.

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?

The description opens with a specific verb+resource ('Encode text to Base64') and immediately scopes behavior ('converted to UTF-8 bytes first, so any language and emoji work'). Encoding is inherently distinct from the sibling decode/validate operations, so an agent can select this tool 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the encode/decode/validate naming and the stated output ('Returns only the Base64 string'), but the description never explicitly says when to pick this over base64_decode or base64_validate. An agent would likely get it right, but there is no stated routing rule or exclusion.

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