Skip to main content
Glama

Agent Data Tools: Utilities

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.04/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "text_keyword_density"
  }
}

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. Changed2 schema fields changed
    • changedInput schema / properties / top / maximum
      Previous value: -9007199254740991New value: +50
    • changedInput schema / properties / top / minimum
      Previous value: --9007199254740991New value: +1
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations it discloses that stop words are removed, that URL input is read as HTML capped at 1 MB, and that the operation neither reads nor writes state — consistent with readOnlyHint=true and destructiveHint=false. It also explains the pricing model (charged per call, first 10 free, failed calls free, repeats not free), which directly accounts for idempotentHint=false and tells the agent to avoid redundant calls.

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?

The core output shape and the input forms are front-loaded in the first two sentences, before pricing and disclaimers. The example sentence is somewhat verbose and the billing note, while relevant, stretches the block, so it is efficient but not maximally tight.

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?

There is no output schema, and the description fully characterises the return values (keywords and phrases with counts and shares, plus total and unique counts). Input constraints, stop-word handling, and cost behaviour are all covered, so an agent has everything needed to call it 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%, so the description is not required to define top/url/text. It still adds useful meaning not in the schema: stop words are removed from the tokenisation, and URL input is treated as HTML capped at 1 MB rather than raw text. That goes modestly beyond the baseline the complete schema would otherwise justify.

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?

The description states a specific operation on a specific resource: the most frequent words and two-word phrases, each with count and share, plus total and unique word counts, from either text or a page URL. It explicitly distinguishes itself from text_stats for readability, so an agent can separate the two without opening either schema.

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?

It names concrete use cases (SEO copy checks, comparing a page against a target keyword, summarising a page's topic) and routes readability questions to the sibling text_stats. The when-to-use and the alternative are both explicit, leaving little to inference.

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