Skip to main content
Glama

Razi Dev Utilities

encode_base64

Encode UTF-8 text as standard Base64 (padded, A-Z a-z 0-9 + /), for embedding binary-unsafe content in JSON, data URIs, HTTP headers or Basic auth. Returns JSON { encoded }. The output uses the standard alphabet, so it is NOT URL-safe: '+' and '/' must still be percent-escaped before they go in a query string or path segment, and this tool does not do that. It is an encoding, not encryption — anyone can reverse it with decode_base64. Runs locally, no size limit beyond the request body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe plain text to encode, interpreted as UTF-8. Must be a string; raw binary cannot be passed through this parameter.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden and meets it thoroughly: it states the return shape ('Returns JSON { encoded }'), alphabet and padding, the URL-safety caveat, local execution, no size limit beyond the request body, and that it is reversible rather than encryption. This is far beyond what the schema alone provides.

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?

Every sentence carries distinct information: use cases, return format, URL-safety caveat, non-encryption, and operational limits. The main action is front-loaded before caveats, and there is no repetitive or filler content.

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 single-parameter utility, the definition covers purpose, use cases, output format, caveats, and operational constraints, enough for an agent to invoke it correctly even without an output schema. The sibling list is small and the description already differentiates from decode_base64, making the context complete.

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 baseline is 3. The description confirms the input is UTF-8 text and notes raw binary cannot be passed, but that information already exists in the schema's parameter description; it adds no new semantic detail beyond contextualizing the encoding.

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 and resource: 'Encode UTF-8 text as standard Base64,' specifying the exact alphabet and padding. This clearly distinguishes it from sibling tools such as decode_base64 (reverse operation) and decode_jwt, leaving no ambiguity about the tool's function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It explicitly names use cases ('embedding binary-unsafe content in JSON, data URIs, HTTP headers or Basic auth') and explicit when-not-to-use conditions: the output is not URL-safe, '+' and '/' must be percent-escaped, and the tool does not do that. It also clarifies it is not encryption and points to decode_base64 as the reverse operation, giving an agent clear selection 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