Home / Servers / Text Toolkit / truncate_text

Truncate text

An MCP tool from the Text Toolkit server, hosted on mcp.hjlabs.in.

Shorten a text to a maximum number of characters or words without cutting a word in half, adding an ellipsis (or a suffix you choose) if anything was removed.

Name on the gateway: text__truncate_text · read-only.

Parameters

NameTypeDescription
text requiredstringThe text.
max requiredintegerMaximum length.
unitcharacters | wordsCount "characters" or "words". Default "characters".
suffixstringAppended when truncated. Default "…".

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "text__truncate_text",
  "arguments": {
    "text": "…",
    "max": 0
  }
}

Or connect the Text Toolkit server directly, which lists 43 tools including this one:

Run in your terminal
claude mcp add --transport http hj-text https://mcp.hjlabs.in/mcp/text \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the truncate text tool with text set to ….

More from Text Toolkit