Skip to main content
Glama

Base64 encode: encode text as base64 and URL-safe base64

base64_encode
Read-only

Encode UTF-8 text as standard base64, and also return the URL-safe variant. Use for data URLs, headers and basic auth strings. Example: text=hello world. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesThe text to encode

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), so the description's 'reads or computes only' is a mild restatement. The real added value is operational: per-call pricing, a free tier of 25 calls, and that failed calls are not charged — cost behavior an agent cannot get from annotations. It does not describe output formatting details beyond naming the two variants.

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?

Purpose and second output are front-loaded, and every sentence carries information. The closing sentence is dense, packing pricing, free tier, failure policy and the repetition warning together with an inline '(/credits)' fragment, which slightly hurts readability but does not waste 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?

The tool has one simple parameter and no output schema, and the description compensates by saying exactly what comes back (standard base64 plus URL-safe variant). With annotations covering side-effect behavior and the description covering cost and return shape, an agent has everything needed to call it correctly.

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% for the single 'text' parameter, so the baseline would be 3. The description adds a concrete example ('text=hello world') that clarifies the input is raw, unencoded text rather than an already-encoded string, which is a meaningful disambiguation.

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 and resource ('Encode UTF-8 text as standard base64') and goes further by naming the second output ('URL-safe variant'). That distinguishes it cleanly from the sibling base64_decode and from other encoding tools like url_encode or hash.

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?

It gives concrete use cases ('data URLs, headers and basic auth strings') and a worked example, which is enough for an agent to place the tool. It does not explicitly say when to prefer a sibling (e.g. url_encode for percent-encoding) or when not to use it, so it falls short of a 5.

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.