Skip to main content
Glama

Base64 encode

base64_encode
Read-only

Encode UTF-8 text as base64. Set url_safe for the URL-safe alphabet (- and _ in place of + and /, no padding), as used in JSON Web Tokens. Runs locally. Returns the encoded string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to encode.
url_safeNoUse the URL-safe alphabet without padding. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • changedInput schema / properties / input / description
      Previous value: -"UTF-8 string to encode"New value: +"UTF-8 plaintext string to encode, e.g. \"Hello, world!\" or binary-safe data."
  4. 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=true, so the description correctly reinforces that this is a pure function. It adds the valuable detail that it 'Runs locally', implying no network calls or external dependencies. The description also clarifies padding behavior for url_safe, which is beyond what annotations cover. No contradiction found.

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 sentences, each earning its place: purpose, optional variant, and execution context. Information is front-loaded and there is zero filler.

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 simple two-parameter encode tool with a trivial string output, the description covers purpose, behavior (local, deterministic), parameter options, and return type. No critical information is missing that an agent would need to invoke it correctly.

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%, with both 'text' and 'url_safe' already explained. The description adds a JWT use-case reference and clarifies the alphabet substitution, but these are minor enhancements over the schema. Baseline of 3 is appropriate since the schema already carries the main parameter meaning.

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 states a specific verb ('Encode'), a resource ('UTF-8 text'), and the target format ('base64'), with a clear differentiation from sibling base64_decode. It also mentions the URL-safe variant, leaving no ambiguity about what the tool does.

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?

The description gives clear context for when to use the url_safe parameter ('as used in JSON Web Tokens') and implies this is the encode counterpart to base64_decode. It does not explicitly state when not to use it, but the purpose is so obvious that exclusion is unnecessary. Slight deduction for not mentioning that this is the only encoding tool for general text.

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