Skip to main content
Glama

base64_encode

Encode UTF-8 text into Base64 format for safe embedding in JSON, URLs, or HTTP headers. Handles non-ASCII characters correctly.

Instructions

Encode a UTF-8 text string to Base64. Handles non-ASCII characters correctly. Returns the Base64-encoded string. Has no side effects. Use when you need to embed binary or unicode data in JSON, URLs, or HTTP headers. Do NOT use to encode binary files — this tool accepts UTF-8 text only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe UTF-8 text to encode as Base64.
Behavior5/5

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

No annotations provided, but description discloses no side effects, handles non-ASCII correctly, and only accepts UTF-8 text. Fully transparent for a simple encoding tool.

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?

Four sentences, all informative with no wasted words. Front-loaded with action and resource.

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?

Complete for a simple tool. No output schema needed as return value is described. All necessary context provided given low complexity.

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% with clear parameter description. Description adds value by clarifying non-ASCII handling and side-effect behavior, but baseline is 3 due to high schema coverage.

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?

Clearly states 'Encode a UTF-8 text string to Base64' with specific verb and resource. Distinguishes from sibling tools like base64_decode and url_encode.

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?

Explicitly states when to use (embed binary/unicode in JSON, URLs, HTTP headers) and when not to use (binary files). Provides clear context for agent decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server