Readability scores, keyword density, and a URL-ready slug from a block of text — a one-pass content-quality check for writers and SEO tools.
A content writer or SEO agent has drafted copy and wants a quality gate before publishing: Is the reading level appropriate for the audience? Which words dominate (keyword stuffing check)? What's the ideal URL slug? Running readability-score, word-frequency, and slug-generate individually produces three disconnected results; this pack sequences them and assembles a single quality card with pass/warn/fail signals the caller can act on. Useful for CMS pre-publish checks, blog-post pipelines, newsletter QA, and any agent that writes prose and needs a confidence score before shipping.
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Run a content quality check using Agent402. Example text: "Artificial intelligence is transforming the way businesses operate. Companies across every industry are adopting AI tools to automate repetitive tasks, analyze large datasets, and make better decisions. The impact of AI on productivity has been significant, with studies showing up to 40% improvement in certain workflows." Title for slug: "How AI Is Transforming Business Operations".
(1) readability-score with text=<the input text> — returns {words, sentences, syllables, fleschReadingEase, fleschKincaidGrade, gunningFog, automatedReadability}. Compute level: fleschReadingEase >= 60 ? 'easy' : fleschReadingEase >= 30 ? 'moderate' : 'difficult'. Initialize warnings = []. If fleschKincaidGrade > 12, push 'Grade level above 12 — may be too complex for general audiences'.
(2) word-frequency with text=<the input text>, top=10 — returns {words: [{word, count}], bigrams: [{bigram, count}], totalWords, uniqueWords}. For each word in top 10: compute pct = (count / totalWords * 100).toFixed(1). If any pct > 5, push 'Potential keyword stuffing: "{word}" at {pct}%'. Set stuffingWarning = any pct > 5.
(3) slug-generate with text=<title or first sentence>, maxLength=60 — returns {slug, length}. Set truncateWarning = original slug would have been > 60 chars.
Compute qualityScore: 'review' if fleschKincaidGrade > 14 or stuffingWarning; 'warn' if fleschKincaidGrade > 10 or any word pct > 3; else 'pass'.
Final return: {readability: {fleschEase: fleschReadingEase, gradeLevel: fleschKincaidGrade, fogIndex: gunningFog, level}, keywords: {top: words.map(w => ({...w, pct})), bigrams, stuffingWarning}, slug: {value: slug, length, truncateWarning}, wordCount: words count from step 1, sentenceCount: sentences from step 1, qualityScore, warnings}. Budget ~$0.003 paid; all 3 tools are pure-CPU (PoW-eligible, free with compute payment).