Skip to main content
Glama

text_encode

Read-onlyIdempotent

utilpeek: Encode or decode text: base64, hex, URL, punycode, JWT decode, ... For digests use hash_text; for a JWT's claims use decode_jwt. Returns the text encoded or decoded with codec: base64, base64url, base32, hex, url (percent), url_form (+ = space), html, quoted_printable, rot13, punycode, idna or jwt. Decoders are strict (bad input: 422 decode_failed); non-UTF-8 bytes come back as output_base64. jwt is decode only: the header and payload are decoded and the signature is NEVER verified (every reply says signature_verified: false), so a decoded token proves nothing about who issued it; the token is never echoed back. Typically under 0.3 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. The submitted text is never logged or stored.

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": {
      "text": "<text>",
      "codec": "<codec>"
    },
    "name": "text_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesAt most 100,000 characters; never logged; a JWT is never echoed back.
codecYesbase64, base64url, base32, hex, url, url_form (+ = space), html, quoted_printable, rot13, punycode, idna, jwt (decode only, unverified).
directionNoencode (default) or decode; jwt is decode only.encode

Output Schema

NameRequiredDescriptionDefault
bytesNo
codecNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
flagsNo
binaryNo
headerNo
outputNo
sourceNo
payloadNo
warningNo
directionNo
output_base64No
signature_verifiedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / codec / description
      Previous value: -"base64, base64url, base32, hex, url, html, quoted_printable, rot13, punycode, idna or jwt (decode only; the signature is never verified)."New value: +"base64, base64url, base32, hex, url, url_form (+ = space), html, quoted_printable, rot13, punycode, idna, jwt (decode only, unverified)."
    • changedInput schema / properties / codec / enum
      Previous value: -[
      -  "base64",
      -  "base64url",
      -  "base32",
      -  "hex",
      -  "url",
      -  "html",
      -  "quoted_printable",
      -  "rot13",
      -  "punycode",
      -  "idna",
      -  "jwt"
      -]New value: +[
      +  "base64",
      +  "base64url",
      +  "base32",
      +  "hex",
      +  "url",
      +  "url_form",
      +  "html",
      +  "quoted_printable",
      +  "rot13",
      +  "punycode",
      +  "idna",
      +  "jwt"
      +]
  2. Changed4 schema fields changed
    • removedInput schema / properties / codec / title
      Removed value: -"Codec"
    • removedInput schema / properties / direction / title
      Removed value: -"Direction"
    • removedInput schema / properties / text / title
      Removed value: -"Text"
    • removedInput schema / title
      Removed value: -"text_encodeArguments"
  3. Changed2 schema fields changed
    • addedInput schema / properties / direction / description
      Added value: +"encode (default) or decode; jwt is decode only."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "binary": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "codec": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "direction": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "flags": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "header": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "output": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "output_base64": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "payload": {},
      +    "signature_verified": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "warning": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/non-destructive annotations: strict decoders returning 422 decode_failed, non-UTF-8 bytes surfaced as `output_base64`, JWT signatures never verified with `signature_verified: false`, tokens never echoed, latency, pricing/free-tier quota, and a no-logging guarantee. The security caveat about jwt is exactly the kind of context an agent cannot infer from structured fields.

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 with the core action and sibling routing, then behavior, then commercial terms — a sensible order with no filler sentences. Slight redundancy in re-listing every codec name that the schema enum already enumerates, and pricing/quota text, while useful, dilutes density.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers everything needed for correct invocation: input constraints, direction semantics, failure mode, output shape for binary data, and the security caveat on JWT. With an output schema present and annotations covering safety, no meaningful gap remains.

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%, with both enums (codec, direction) already documented, so the baseline is 3. The description largely restates those enumerations, though it does add the `url_form` meaning (+ = space) in prose form and the decode-only constraint for jwt that the schema already carries.

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 (encode/decode) and resource (text), enumerates the codec families supported, and clearly distinguishes itself from hash_text and decode_jwt. An agent can tell what this does without opening 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 Guidelines5/5

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

Names two explicit alternatives with the conditions that select them: 'For digests use hash_text; for a JWT's claims use decode_jwt.' It also flags that the `jwt` codec is decode-only, so there is no ambiguity about which route to take for JWT work.

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