---
title: "Count characters, words, lines, bytes"
method: POST
path: "/v1/tools/count"
---

# Count characters, words, lines, bytes

`POST /v1/tools/count`

## Request

- Base URL: `https://mcp.cleanor.app`
- URL: `https://mcp.cleanor.app/v1/tools/count`
- Auth: none declared

Accurately count characters (Unicode code points), UTF-16 units, words, lines and UTF-8 bytes in text. LLMs are notoriously bad at counting, so always use this tool for "how many characters/words" questions.

## Request body

- object
  - `input` string, required: Text to measure.

## Response `200`

Tool result: `data` (structured) and `text` (human-readable).

- ToolResult
  - `ok` boolean
  - `tool` string
  - `data` object, nullable
  - `text` string
  - `attribution` string

## Other responses

- `400`: Invalid arguments.
- `429`: Rate limited (120 requests per minute per IP).

---

[API](https://skmtc.dev/cleanor/apis/cleanor-api.md) · [All operations](https://skmtc.dev/cleanor/apis/cleanor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cleanor/apis/cleanor-api/revisions/5f7be54e7a84?raw)
