Skip to main content
Glama
mcp-server-demo

mcp-server-demo

by mcvalosborne

Word count

word_count
Read-onlyIdempotent

Count words, characters, and lines in a text input to measure content length and line structure.

Instructions

Count words, characters, and lines in text. Words are runs of non-whitespace. Characters are Unicode code points. Lines are separated by newlines, and a trailing newline does not add an extra line.

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
textYesText to measure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is fully covered structurally. The description adds genuine definitional behavior beyond that: what constitutes a word, how characters are counted (Unicode code points), and the trailing-newline line-counting edge case. Its only weakness is that, with no output schema, it never states the shape of the returned counts.

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

Conciseness5/5

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

Four short sentences, front-loaded with the core action, then three crisp clarification rules. Every sentence carries distinct information and none restates the name or title.

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?

For a one-parameter, side-effect-free counting tool with rich annotations, the definition covers the semantics an agent actually needs. The remaining gap is the undocumented return shape, which matters more here because no output schema exists to compensate.

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% and the single parameter 'text' is documented in the schema, so the baseline of 3 applies. The description clarifies how that input is interpreted but adds no parameter-level syntax or format detail beyond the schema.

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 opens with a specific verb ('Count') applied to three named resources (words, characters, lines), which leaves no ambiguity about what the tool returns. It is trivially distinguishable from the unrelated siblings convert_units and fetch_page_title, so no sibling disambiguation is needed.

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 implied by the narrow, self-explanatory nature of the tool rather than stated. There is no explicit 'use this when' framing, but there also are no plausible alternatives to route between, so the gap is minor rather than misleading.

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