Skip to main content
Glama

Util base64

util_base64
Read-onlyIdempotent

Use when you need base64 in or out: encode UTF-8 text to base64 (standard or url_safe) or decode base64 back to text (hex when the bytes are not UTF-8), up to 64 KB, no external call. Returns the exact paid x402 request for your input (GET /util/base64, $0.001 per call), with the response schema and an example; call that URL with an x402 or MPP client to get the data. Bad input is refused before any charge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesText to encode, or base64 to decode
actionNoencode or decodeencode
url_safeNoUse the url-safe alphabet without padding

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover safety/idempotency, so the description adds substantial behavioral context: a 64 KB size cap, 'no external call', decode-to-hex behavior for non-UTF-8 bytes, and the crucial workflow detail that bad input is refused before any charge.

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 use condition, and every sentence carries weight (limits, pricing, rejection-before-charge). It is a dense single paragraph, slightly run-on, but no filler.

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 explaining the x402 payment workflow, the returned request shape, the price, and that a response schema plus example are included. An agent has enough to invoke and follow through correctly.

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 description coverage is 100%, so the baseline is 3. The description clarifies the url_safe variant (no padding) and the hex decode fallback, but mostly restates what the schema already documents.

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 specific verbs and resources: encode UTF-8 text to base64 (standard or url_safe) or decode base64 back to text, with hex fallback for non-UTF-8 bytes. An agent can distinguish this from siblings like util_hash or util_jwt_decode without opening either schema.

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?

'Use when you need base64 in or out' gives a clear triggering condition, and it outlines the encode/decode choice. It doesn't explicitly name sibling alternatives, but the trigger context is unambiguous.

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.