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
| Name | Type | Description |
|---|---|---|
text required | string | The text. |
max required | integer | Maximum length. |
unit | characters | words | Count "characters" or "words". Default "characters". |
suffix | string | Appended 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:
{
"name": "text__truncate_text",
"arguments": {
"text": "…",
"max": 0
}
}Or connect the Text Toolkit server directly, which lists 43 tools including this one:
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 ….