seo_keyword_density_checker
Analyze plain text or HTML to detect keyword stuffing and repeated phrases. Get keyword density percentages, n-gram rankings, and over-optimization warnings for SEO content audit.
Instructions
SEO Keyword Density and N-gram Checker. Analyze plain text or HTML for keyword density and repeated phrases as an SEO content audit. Tokenizes the text (Unicode-aware, optional HTML tag/entity stripping, optional stopword removal) and returns the top unigrams, bigrams, and trigrams ranked by frequency, each with a density percentage, plus document stats (word/char/sentence/paragraph counts, unique words, lexical diversity) and over-optimization warnings when any term exceeds roughly 3-5% density. Use this when you need per-keyword and per-phrase density to detect keyword stuffing; use text_word_frequency for a plain single-word frequency list with no SEO density or n-gram analysis, text_text_statistics for readability/structure metrics without keyword ranking, seo_title_description_length_checker to validate title/meta length, and seo_meta_tag_generator to author the head tags. Runs locally on the text you provide: read-only, deterministic, non-destructive, contacts no external service, and is rate-limited (3
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Content to analyze: UTF-8 plain text, or an HTML document when mode is html. Must not be blank. Hard cap roughly 5 MB. | |
| mode | No | Input format. plain analyzes text verbatim; html strips script/style/comments/tags and decodes entities before analysis. Unrecognized values fall back to plain. | plain |
| stopwords | No | Stopword filter for the unigram ranking and (when active) n-grams. en/english uses the built-in English list; none/off/empty disables filtering; an array of strings supplies a custom case-insensitive list. Any other string defaults to the English list. | en |
| minLength | No | Minimum token character length to include in rankings; shorter tokens are dropped. Clamped to 1-10. | |
| topN | No | Maximum number of entries returned in each of the unigram, bigram, and trigram tables. Clamped to 1-100. | |
| operation | No | Operation to run. Only analyze is supported. | analyze |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Whether the analysis succeeded. | |
| operation | No | The operation performed (analyze). | |
| result | No | The keyword density analysis. |