Skip to main content
Glama

base64_convert

Read-only

Encode UTF-8 text to Base64, or decode Base64, with the standard or URL-safe alphabet. Use it for data URIs, HTTP headers or token segments; to read a JWT use jwt_decode. Runs without network access and does not store your input. Input up to 100,000 bytes; larger input is an error. Encode returns base64 and bytes; URL-safe output has no padding. Decode accepts padded or unpadded input and returns text when the bytes are valid UTF-8, otherwise text null plus hex. Invalid Base64 is an error.

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": {
      "data": "<data>",
      "action": "<action>"
    },
    "name": "base64_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesText or Base64 data, up to 100 KB.
actionYes
url_safeNoUse the URL-safe alphabet without padding.
l402_proofNoL402 payment proof "<macaroon>:<preimage>". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / l402_proof / description
      Previous value: -"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 5 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."New value: +"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."
  2. Changed1 schema field changed
    • addedInput schema / properties / l402_proof
      Added value: +{
      +  "description": "L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 5 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the read-only/non-destructive profile, and the description adds real behavior: a hard 100,000-byte ceiling that errors, no network access, no storage of input, padding rules, and error conditions for invalid Base64. The notable gap is the L402 payment flow — the description never warns that a first call can return a Lightning invoice and macaroon that must be paid and retried, which is a major behavioral trait for an agent planner. The claim of running 'without network access' also sits awkwardly against openWorldHint=true and the payment mechanism in the schema.

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?

Purpose is front-loaded, the sibling pointer comes second, then constraints and return shapes in descending order of importance. Every sentence carries distinct information; nothing is restated from the title or annotations.

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 properly explains return values for both directions (base64+bytes on encode; text or text-null+hex on decode) and states failure modes. The missing piece is the payment/retry protocol, which an agent needs in order to interpret an unpaid first response.

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 75% schema coverage the schema already documents most parameters, yet the description still adds meaning: the 100 KB bound on 'data', the padding-free nature of URL-safe output, and that decode accepts both padded and unpadded input. Only l402_proof is left entirely to the schema.

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 first sentence gives specific verbs (encode/decode) and the exact resource (UTF-8 text to/from Base64) plus the alphabet variant. It explicitly separates itself from the sibling jwt_decode, so an agent can route correctly without opening 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 Guidelines5/5

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

It names concrete use cases (data URIs, HTTP headers, token segments) and gives an explicit alternative with the condition that selects it: 'to read a JWT use jwt_decode'. This is the when-to-use / when-to-use-something-else pairing done properly.

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