Skip to main content
Glama

Agent Data Tools: Utilities

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 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "base64_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to encode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, but the description adds genuinely new information: that both the standard and URL-safe encodings are returned (no output schema exists to say this) and the per-call cost model including free failures and the first-10-free allowance. The sentence 'Reads or computes only and changes nothing' largely restates the annotations, and the cost warning is slightly ambiguous against idempotentHint=false, but neither contradicts them.

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?

Three sentences, front-loaded with purpose then use cases then cost/safety, and the worked example is compact. The safety clause duplicates the annotations and the pricing sentence is dense, but the cost warning is actionable for an agent that might retry in a loop.

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?

For a one-parameter, non-destructive transform with no output schema, the description covers what goes in (UTF-8 text), what comes back (both base64 variants), typical uses, and the billing consequence. An agent can call it correctly without further information.

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?

With a single parameter at 100% schema coverage, the baseline is 4. The description adds marginal meaning by specifying the input must be UTF-8 text and providing a literal example value, which the schema's 'The text to encode' does not spell out.

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?

States a specific verb and resource ('Encode UTF-8 text as standard base64') and adds the output scope ('also return the URL-safe variant'), which separates it from base64_decode and url_encode. It stops short of naming those siblings, so the differentiation is inferential rather than explicit.

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 usage contexts ('data URLs, headers and basic auth strings') and a worked example ('text=hello world'), which is enough for an agent to recognize the right scenario. There are no when-not conditions or named alternatives for the URL-safe vs standard choice.

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