Skip to main content
Glama

base64_encode

Encode UTF-8 text to Base64 to embed binary or Unicode data in JSON, URLs, or HTTP headers.

Instructions

Encode a UTF-8 text string to Base64. Handles non-ASCII characters correctly. Use when you need to embed binary or unicode data in JSON, URLs, or HTTP headers.

Input Schema

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

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

With no annotations provided, the description carries full burden. It mentions handling non-ASCII characters correctly, which is a behavioral trait, but does not disclose any side effects, auth needs, or rate limits. The transparency is adequate but not exceptional.

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?

Two sentences, no redundant information. Every sentence serves a purpose: the first states the core function, the second provides usage context. Highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 param, no output schema, no nested objects), the description is largely complete. It covers purpose, usage context, and an important behavioral note. However, it could optionally mention that the output is a Base64 string, though that is standard.

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 coverage is 100%, so the schema already describes the 'text' parameter fully. The description adds minimal value by mentioning 'handles non-ASCII characters correctly', but that is a behavioral trait rather than parameter semantics. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the verb 'Encode' with the resource 'UTF-8 text string to Base64', clearly stating the function. It distinguishes from siblings like base64_decode and url_encode by specifying Base64 encoding, though it does not explicitly differentiate from 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 Guidelines4/5

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

The description provides explicit usage context: 'Use when you need to embed binary or unicode data in JSON, URLs, or HTTP headers.' It does not include when to avoid or mention alternatives, but the guidance is clear and relevant.

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