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. With a P0 access key (header Authorization: Bearer p0k_…, buy one at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5) this tool makes the paid call itself and returns the data, deducting the listed price.

Input 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.3/5.0
Behavior5/5

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

Goes well past the annotations (readOnly/idempotent/openWorld) by disclosing the 64 KB input ceiling, that encoding is local with 'no external call', the $0.001 per-call price, and that bad input is refused before any charge. It also spells out the auth prerequisite (Authorization: Bearer p0k_… plus where to buy a key) and how behavior changes when that key is absent.

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?

The trigger condition is front-loaded and the pricing/auth detail follows in a logical order; nearly every clause carries operational information. It is a single dense paragraph with an embedded key-purchase URL, so it is heavier than ideal but not padded with filler.

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?

With no output schema, the description still explains what comes back in each mode — a ready-to-send x402 request with response schema and example, versus the decoded/encoded data when authenticated. Combined with limits, pricing, and pre-charge validation, an agent has what it needs, though the exact response shape is only described, not exemplified.

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% and each of the three parameters is already documented in the schema, so the baseline applies. The description adds only the 64 KB limit (matching maxLength) and the decode-to-hex behavior; it introduces no additional parameter syntax or format guidance.

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 and resource ('encode UTF-8 text to base64 ... or decode base64 back to text'), including supported alphabets and the hex fallback for non-UTF-8 bytes. It is unmistakable against neighbors like util_hash or util_jwt_decode without reading the 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?

Opens with an explicit trigger ('Use when you need base64 in or out') and explains the two operating modes: build a paid request to hand to an x402/MPP client, or have the tool execute it directly when a P0 key is present. It does not name an alternative sibling or state when not to use it, which keeps it off a 5.

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