word_count
Count characters, words, and lines in text and return the three totals. Use for exact counts, not estimates; it does not tokenize or detect language.
Instructions
Count the characters, words and lines of a text and return the three counts as an object. Pure and stateless: the text is not stored or sent anywhere; no auth beyond the group's key. Words are whitespace-separated runs; lines are newline-separated (a trailing newline does not add a line); characters are Unicode code points including whitespace. Use it when a model needs an exact count rather than an estimate; it does not tokenise or detect language.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | the text to count; may be empty, which yields zeros |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | newline-separated lines; 0 for an empty text | |
| words | Yes | whitespace-separated runs | |
| characters | Yes | Unicode code points, whitespace included |