Skip to main content
Glama

Base64 encode and decode

util_base64

Base64 in both directions, including the URL-safe alphabet, with UTF-8 handled properly. Encoding is what carries payloads through headers and JSON, and x402 itself rides on it. Flat $0.001 per call, paid over x402 (USDC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoencode | decode. Defaults to encode.
inputYesThe text or base64 to convert.
urlSafeNoUse the URL-safe alphabet (-_ instead of +/).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The description discloses the cost behavior ($0.001 per call) and payment mechanism (x402/USDC), which are critical behavioral traits. It does not mention error handling (e.g., invalid base64 input) or output format, but these are standard for such utilities. Given no annotations exist, the description carries the burden and covers cost/payment well, with minor omissions on edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: two sentences covering functionality, use cases, and pricing. It front-loads the core action ('Base64 in both directions') and avoids redundancy. Every sentence adds value; no filler or unnecessary details.

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?

The description is complete for a simple utility tool. It covers the core function, use cases (headers, JSON, x402), and cost. It does not explicitly state the return format (e.g., returns a base64 string), but this is implied and standard. Given no output schema, the description sufficiently equips an agent to call the tool correctly.

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?

The schema has 100% description coverage for all three parameters (mode, input, urlSafe). The description adds extra context: 'with UTF-8 handled properly' clarifies input encoding, and the description of urlSafe ('URL-safe alphabet (-_ instead of +/)') reinforces the schema. This goes beyond the schema by explaining encoding behavior, but the baseline is already high due to full schema coverage.

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?

The description clearly states the tool's function: 'Base64 in both directions, including the URL-safe alphabet, with UTF-8 handled properly.' It specifies the resource (base64 data) and the actions (encode/decode). It also differentiates from sibling tools by focusing on base64, while siblings handle hex, units, etc. The mention of payloads and x402 adds context without obscuring the core purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly mentions usage context: 'Encoding is what carries payloads through headers and JSON, and x402 itself rides on it.' It also discloses pricing and payment method: 'Flat $0.001 per call, paid over x402 (USDC).' This gives clear guidance on when and how to use the tool, even though it doesn't explicitly name alternatives—there are no direct siblings for base64 functionality.

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