Skip to main content
Glama

Check keyword density

check_keyword_density
Read-onlyIdempotent

Computes keyword density for a public page URL or a block of text (exactly one of url or text): total and unique words, sentences, reading time, and the most frequent one-, two- and three-word phrases with count and density. With target_keyword it also returns its count, density, a verdict (ideal between 0.5% and 2.5%) and whether it appears in the title, meta description, H1 and first 100 words (placement flags are null for pasted text). Pages are fetched server-side as Googlebot with a Chrome fallback, JavaScript is not executed, at most 1 MB of HTML is read and the extracted text is cached for 1 hour. Fails for pages behind bot protection, non-HTML URLs or JavaScript-only pages: pass the page text instead. Any public page can be checked, not only the user's websites. Limited to 20 checks per 15 minutes. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) page URL to fetch and analyze. Exactly one of url or text must be set: sending both or neither is rejected.
textNoRaw text to analyze (max 200000 characters). Exactly one of url or text must be set: sending both or neither is rejected.
max_phrasesNoHow many phrases to return per phrase length (1 to 50).
target_keywordNoKeyword or phrase to measure density and placement for.
exclude_stop_wordsNoSkip phrases that start or end with an English stop word (the, of, and...).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYesnull when text was analyzed.
reportYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide readOnly/idempotent/openWorld hints, but the description adds substantial behavioral context beyond them: server-side fetching as Googlebot with Chrome fallback, no JavaScript execution, 1 MB HTML cap, 1-hour cache, failure modes, and rate limiting. This gives the agent a realistic model of how the tool behaves before calling it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Six sentences, each dense with non-redundant information, starting with the core output and progressing through fetch details, failure handling, scope, and limits. There is no filler or repetition; the structure makes it easy for an agent to quickly extract constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers input modes, computed outputs, fetch mechanism, success/failure conditions, scope, cache behavior, and rate limits. Since an output schema exists, return-value details do not need to be repeated, and nothing critical is missing for an agent to decide when and how to invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter already has a solid description, so the baseline is 3. The description adds meaning beyond the schema by explaining target_keyword's verdict threshold (0.5%–2.5%), placement flags behavior, and the url/text mutual-exclusion rule. This is valuable clarification, though not exhaustive since schema already covers defaults and ranges.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states a specific verb and resource: 'Computes keyword density for a public page URL or a block of text' and enumerates exact outputs (word counts, reading time, n-grams, target keyword verdict). This clearly differentiates it from siblings like check_seo_score or research_keywords, which target broader SEO analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description gives explicit usage context: exactly one of url or text must be provided, and it tells the agent to pass page text when the URL fails due to bot protection, non-HTML, or JavaScript-only pages. It also clarifies any public page can be checked and notes the 20-per-15-minute rate limit. It does not explicitly compare against sibling tools, but the within-tool guidance is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.