Skip to main content
Glama

Encode

encode
Read-only

Encode or decode text as base64, base64url, hex, URL (percent) encoding, HTML entities, punycode (domain names) or quoted-printable. Body { input, scheme, direction }, up to 1 MB. Invalid input to decode is a 400 that names the position of the first bad character. Unknown HTML entities are reported, not guessed. Pure code, no outside request. Price: $0.002 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault
inputYesThe text to encode or decode (JSON body field)
schemeYesbase64, base64url, hex, url, html, punycode or quoted-printable
directionNoencode (default) or decode

Output Schema

NameRequiredDescriptionDefault
outputNo
schemeNo
sourceNo
checkedAtNo
directionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior1/5

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

The description explicitly says 'Pure code, no outside request', yet the annotations declare openWorldHint=true, which signals interaction with an open world of external entities. That is a direct contradiction between prose and structured metadata. Aside from that, the description does add useful behavior (1 MB cap, 400 errors naming the position of the first bad character, unknown HTML entities reported not guessed, failures not charged), but the conflict on the open/closed-world profile is the dominant signal.

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 scheme list and body shape are front-loaded, and each subsequent sentence adds a distinct fact (size cap, error behavior, entity handling, purity, pricing). It is dense and mostly waste-free; pricing and purity could arguably be trimmed, but both matter for a paid x402 tool.

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 an output schema present, return values need not be explained, and the description covers the input limit, direction default, failure mode, and cost model. The main gap is that the open/closed-world profile is muddled by the annotation conflict rather than clarified by the prose.

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?

Schema description coverage is 100%, so the baseline is 3; the description goes beyond it by restating the body fields, adding a concrete size limit ('up to 1 MB'), and describing what a bad decode input produces. It does not enumerate allowed scheme values as enums or explain scheme-specific edge cases, so it stops short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb pair (encode/decode) and enumerates the exact schemes supported (base64, base64url, hex, url, html, punycode, quoted-printable), which implicitly separates it from nearby siblings like hash, evm_decode, and jwt_decode. It does not explicitly name an alternative tool, so sibling differentiation is by enumeration rather than by routing statement.

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

Usage Guidelines3/5

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

Usage is implied: the body shape and the direction field ('encode (default) or decode') tell the agent how to invoke it, and 'Pure code, no outside request' gives context. But there is no explicit when-to-use/when-not guidance and no named alternative (e.g. use hash for digests, jwt_decode for tokens), so routing between this and adjacent tools rests on inference.

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