Skip to main content
Glama

Token frequency ranking

bpj_count_word_frequency
Read-onlyIdempotent

Rank runs of Unicode letters, marks and numbers by frequency.

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>",
      "limit": "<limit>"
    },
    "name": "bpj_count_word_frequency"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
limitYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description only needs to add operational context. It does contribute the tokenization rule (letters, marks, numbers only, so punctuation is not a term), which is genuine value beyond annotations. It stays silent on case folding, Unicode normalization, stop words, tie-breaking, and sort direction — all material for a frequency ranker.

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?

A single front-loaded sentence with no filler; every word is doing work. It is arguably over-compressed — the terseness is what leaves the gaps above — but there is no redundancy or awkward structure.

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

Completeness3/5

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

For a two-parameter utility with no output schema, the description should at minimum convey the return shape (ranked term/count pairs) and how `limit` truncates it; neither is present, and the 0% schema coverage means nothing else fills the gap. The core operation is nevertheless understandable from the one sentence.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must carry parameter meaning and largely does not. It never mentions `limit` (how many terms are returned, whether the top-N is truncated from a ranked list) or clarifies that `text` is the corpus to be tokenized. Only the implicit ranking direction is hinted at by "by frequency".

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

Purpose4/5

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

States a specific verb ("Rank") and a precisely defined resource ("runs of Unicode letters, marks and numbers") with the ranking key ("by frequency"). The token-definition phrasing is distinctive enough that an agent can tell it apart from generic text utilities like chunk_text or deduplicate_lines, though it never explicitly contrasts with any sibling.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance is given, and no alternatives are named. An agent must infer from the tokenization phrasing that this is for word/term frequency analysis rather than, say, line or character statistics.

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.