Skip to main content
Glama

Keyword density: top keywords and phrases of a text or page

text_keyword_density
Read-only

Keyword density of a text or a web page: the most frequent words and two-word phrases (English stop words removed), each with its count and share of all words, plus total and unique word counts. Give text, or a URL whose readable text is used (HTML, up to 1 MB). Use for SEO copy checks, comparing a page against a target keyword, or summarising what a page is about; for readability use text_stats. Example: text=Agents pay per call. Agents pay with USDC. Pay per call tools for agents.. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
topNoHow many keywords and phrases to return, 1-50 (default 15)
urlNoA page URL to analyse instead of text
textNoThe text (up to 50,000 characters); or give url instead

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, destructiveHint, openWorldHint), but the description adds real context beyond them: HTML fetched up to 1 MB, English stop words removed, and pay-per-call billing where repeats are not free — which meaningfully explains the idempotentHint=false. The 'reads or computes only and changes nothing' clause largely restates readOnlyHint, so not a full 5.

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

Conciseness3/5

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

The core sentence is front-loaded and information-dense, but the description runs on into an example plus a long pricing/payment sentence that mixes billing detail with the tool's function. Every element is arguably relevant, yet the block is harder to scan than it needs to be.

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?

No output schema exists, and the description fully describes the return shape (keywords and phrases with counts and shares, plus total and unique word counts), so an agent knows exactly what comes back. Input modes, limits, and cost model are all covered.

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

Parameters3/5

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

Schema coverage is 100% and the schema already documents `top` (1-50, default 15), `url`, and `text` (50,000 chars). The description adds the 1 MB HTML limit for URL mode and clarifies the text/url exclusivity, but says nothing about `top` or output shaping — baseline 3 is right.

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?

States a specific computation (keyword density), the exact outputs (most frequent words and two-word phrases, each with count and share of all words, plus total/unique word counts), and the accepted inputs (text or URL). It is clearly distinguishable from sibling text tools and explicitly routes readability work to text_stats.

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

Usage Guidelines5/5

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

Names concrete use cases (SEO copy checks, comparing a page against a target keyword, summarising what a page is about) and explicitly names the alternative to use for a different need (text_stats for readability). The input-mode choice (give text, or a URL whose readable text is used) is also spelled out.

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.