Skip to main content
Glama

P0: agent memory and utilities

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 a link to the full schema; 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. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only cover the safe-read profile (readOnlyHint, idempotentHint, openWorldHint, non-destructive), and the description adds substantial context beyond them: the 64 KB cap, no external call, the $0.001 per-call price, and the crucial fact that by default it returns a paid x402 request rather than the data itself unless a P0 bearer key is supplied. It also promises 'Bad input is refused before any charge', which pre-empts the main fear an agent has about a paid endpoint.

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 correctly: the capability sentence comes first, then cost/transport, then the auth exception, then the validation guarantee. The middle sentence is a long run-on that packs the return value, price, schema link, and client instructions into one breath, which costs some readability but every clause carries operational information.

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 three-parameter utility with no output schema, the description covers limit, cost, transport, auth, failure behavior, and return shape well enough to call correctly. The minor gap is that in P0-key mode it doesn't say what the returned data payload looks like, but the schema link mitigates that.

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 all three parameters (input, action enum, url_safe) are already fully documented and the description mostly restates them in prose. The only added meaning is that the 64 KB ceiling matches the input maxLength and that decode yields hex when the bytes are not valid UTF-8, which is output behavior rather than parameter guidance. Baseline 3 applies.

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 pair in both directions: 'encode UTF-8 text to base64 (standard or url_safe) or decode base64 back to text', with the non-UTF-8 hex fallback named. It is immediately distinguishable from siblings like util_hash, util_jwt_decode, or util_json_validate, so an agent can pick it without inspecting any 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' is an explicit trigger condition, and the description spells out the two invocation paths (call the returned x402/MPP URL yourself, or hold a P0 key and let the tool make the paid call). It never names a sibling alternative or a when-not condition, but for a pure utility the context is clear enough to act on.

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