Skip to main content
Glama

Check keyword density

check_keyword_density
Read-onlyIdempotent

Count how often words and two- and three-word phrases appear in a text, with each one's share of the words, and how often the keywords you name appear. There is no ideal density; the answer says so. Answers from what you send alone: nothing is fetched or stored.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "check_keyword_density"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesYour text. Paste the words of the page.
keywordsNoKeywords to look for. Separate with commas. Optional.

Output Schema

NameRequiredDescriptionDefault
toolYes
toolUrlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the bar is lower, yet the description adds real context: nothing is fetched or stored (reinforcing the local-computation model) and the output explicitly declines to assert an ideal density, which prevents the agent from over-reading results. It stops short of describing output shape or limits such as the 200k character cap.

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

Conciseness4/5

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

Three tight sentences with the core behavior front-loaded. Slight awkwardness in 'with each one's share of the words' and mild redundancy between the 'no ideal density' clause and the opening, but nothing is wasted.

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?

An output schema exists, so return values need no explanation, and annotations cover the safety profile. The description supplies the remaining essentials: what is computed, that keywords are optional input, and that the operation is purely local with no judgment about an ideal density.

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 description coverage is 100%, so both parameters are already documented, making 3 the baseline. The description only restates that keywords are matched and that words plus two- and three-word phrases are counted; it does not clarify the comma-separated format, optionality, or how multi-word keyword phrases are matched.

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?

Names a specific verb and resource — counting word and 2-/3-gram frequencies plus each n-gram's share of total words — and adds the keyword-counting behavior. No sibling in the list (generate_keyword_ideas, check_page_seo, check_headings) computes density, so an agent can distinguish it without opening the schema.

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

Usage Guidelines3/5

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

Usage is only implied: paste page text to get density figures. There is no explicit when-to-use, no when-not-to-use, and no routing to alternatives such as generate_keyword_ideas. The 'no ideal density' line sets expectations about interpretation rather than guiding tool selection.

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.

Resources