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), html (entities), quoted_printable, rot13, punycode, idna or jwt. Decoders are strict (bad input is a 422 decode_failed); bytes that are not UTF-8 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, html, quoted_printable, rot13, punycode, idna or jwt (decode only; the signature is never verified).
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. 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"
  2. 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"
      +}
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources