Skip to main content
Glama

Agent Data Tools: Utilities

Base64 encode

base64_encode

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.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only; not marked read-only because each call is charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to encode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false, and the description proactively justifies that flag ('Reads or computes only; not marked read-only because each call is charged'), which prevents an agent from misreading the tool as a mutator. It also discloses cost/permission model ($0.003/call via x402 USDC or card key, first 25 free, failed calls free) and the dual return format — real behavioral context beyond the structured fields.

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?

Front-loaded with the core action and output shape, and the pricing sentence, while long, carries decision-relevant information for a paid tool. The example is slightly redundant given the 100%-covered schema, costing a little density.

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?

With no output schema, the description compensates by stating what comes back (standard plus URL-safe base64), and it covers the commercial/authorization gate an agent must satisfy. Nothing needed to invoke or interpret the call is missing.

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?

There is only one parameter and schema coverage is 100%, so the schema fully documents 'text'. The description's 'text=hello world' example adds a small bit of format confirmation but nothing the schema doesn't already imply; baseline 3 is appropriate.

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?

States a specific verb+resource ('encode UTF-8 text as standard base64') and immediately clarifies the output includes both the standard and URL-safe variants. This cleanly distinguishes it from the sibling base64_decode.

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?

Gives concrete use cases ('data URLs, headers and basic auth strings') and a worked example ('text=hello world'), which is more than most sibling tools offer. It stops short of naming when to prefer an alternative (e.g., url_encode or base64_decode), so it is clear context without explicit exclusions.

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.