---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/text_analysis/variables/textAnalyzeTool.md
description: Analyze text and return statistics as a JSON document.
---

# Variable: textAnalyzeTool

```ts
const textAnalyzeTool: Tool<SpooledJsonArtifact<unknown>>;
```

Defined in: [batteries/tools/text\_analysis/index.ts:25](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/tools/text_analysis/index.ts#L25)

Analyze text and return statistics as a JSON document.

## Remarks

Reports character counts (with and without spaces), word/sentence/paragraph/line counts,
unique word count, average word length, a rough token estimate (4 chars/token), and a set
of character-class booleans (`is_all_alpha`, `is_all_ascii`, etc.).

Output is JSON, so the artifact constructor is set to [@nhtio/adk!SpooledJsonArtifact](../../../../spooled_artifact/classes/SpooledJsonArtifact.md) — consumer
code can read the result back as a parsed record without re-parsing.
