Skip to main content
Glama

word_count

Counts words in a text by identifying whitespace-separated character groups.

Instructions

Count groups of characters separated by whitespace.

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": "word_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It implies a pure, deterministic computation with no side effects, which is the main behavioral fact an agent needs, but it says nothing about edge cases (empty string, punctuation-only input, whitespace runs) or error behavior.

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. The definitional phrasing ("groups of characters separated by whitespace" rather than "words") is longer than necessary but earns its place by pinning down the exact tokenization semantics.

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

Completeness4/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 not be described, and there is only one required parameter. What remains is the core semantic (how words are delimited), which the description supplies; only edge-case handling is left unaddressed.

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 0% for the single 'text' parameter, so the description must compensate. It does so implicitly: by defining the counting rule in terms of characters separated by whitespace, it clarifies that 'text' is the string to be tokenized and how tokenization works, though it adds no format hints or examples.

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 (count) and precisely defines the unit being counted: "groups of characters separated by whitespace." An agent knows exactly what operation this performs, though the description offers no differentiation from siblings (which, given post_message/read_messages operate in another domain, is not a practical gap).

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 guidance, no exclusions, and no mention of alternatives. For a simple utility this is arguably self-evident, but the description provides zero routing signal beyond the operation itself.

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

Deploy Server

Other Tools