Transform text with 20+ operations: Base64/URL/HTML encoding, MD5/SHA-256/SHA-512 hashing, case conversion (upper/lower/title), slugify, truncate, word count, JSON formatting, and more.
Operation name from the list above, e.g. "sha256", "slugify", "base64_encode".
optionsoptional
object
Operation-specific options. max_length (integer) for truncate; ellipsis (string, default "...") for truncate; separator (string, default "-") for slugify.
Output Fields
Field
Type
Description
result
string
Transformed output. For count operations (word_count, char_count, line_count) this is a numeric string.
operation
string
The operation that was applied.
input_length
integer
Character length of the input text.
output_length
integer
Character length of the result string.
Examples
// SHA-256 hash
{
"text": "mysecretpassword",
"operation": "sha256"
}
// Output
{
"result": "89e01536ac207279409d4de1e5253e01ea85473...",
"operation": "sha256",
"input_length": 16,
"output_length": 64
}
// URL slug from accented text
{
"text": "Hello World! Café & Résumé",
"operation": "slugify"
}
// Output
{
"result": "hello-world-cafe-resume",
"operation": "slugify",
"input_length": 25,
"output_length": 23
}
// Truncate with ellipsis
{
"text": "This is a very long description that needs trimming",
"operation": "truncate",
"options": { "max_length": 20 }
}
// Output
{
"result": "This is a very lon...",
"operation": "truncate",
"input_length": 51,
"output_length": 20
}
Install & Discovery
Install
ppm install mcp-text-transform
Get JSON Schema
GET /v1/packages/mcp-text-transform/1.0.0/schema
Discover by keyword
GET /v1/mcp/discover?q=text+transform+hash
Discovery hint: Use this tool whenever an agent needs to hash passwords or tokens, encode data for transmission (Base64, URL), generate URL-safe slugs, sanitize HTML, count words or lines, or reformat JSON payloads.
PascalAI Usage
usestoolslib;
varTX := LoadTool('mcp-text-transform');
// Generate a URL-safe slug from a page titlevarSlug := TX.Call(JsonObj(['text', PageTitle, 'operation', 'slugify']));
// Hash a password with a saltvarHash := TX.Call(JsonObj(['text', Password + Salt, 'operation', 'sha256']));
// Base64-encode binary payloadvarB64 := TX.Call(JsonObj(['text', ImageBytes, 'operation', 'base64_encode']));
Writeln('Slug: ' + Slug['result']);
Writeln('Hash: ' + Hash['result']);