Skip to main content
Glama

word_count

Count words, characters, and paragraphs in Word documents, both overall and per heading section. Get live counts from open documents or file-based totals.

Instructions

Count words/characters/paragraphs, total and per heading section. Documents open in Word are counted live via Word's own statistics engine (ComputeStatistics, the status-bar number); file mode counts whitespace tokens, so the two can differ by a few words on identical content. Live per-section counts are best-effort mirrors of the file-mode logic. For journal counts that exclude references, captions, or other zones, use word_count_with_exclusions. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
liveNoauto
file_pathYes
by_sectionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully carries the behavioral disclosure burden. It states the tool is read-only, explains that live counts use Word's ComputeStatistics/status-bar engine while file mode counts whitespace tokens, and warns that the two can differ. It also flags live per-section counts as best-effort mirrors, which is exactly the kind of non-obvious behavioral context an agent needs.

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 dense, purposeful sentences. The core purpose is front-loaded, then mode behavior, then the sibling alternative in a concise warning. There is no repetition or filler.

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 moderately complex counting tool with no annotations and no schema descriptions, the description covers purpose, modes, limitations, read-only behavior, and the key alternative. It stops short of fully specifying the live parameter's 'auto' semantics and what counts include/exclude, but an output schema exists and the provided context is solid enough for correct selection and basic invocation.

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 description coverage is 0%, so the description must compensate for the schema's silence. It maps by_section to 'per heading section,' explains the 'live' parameter's two modes, and gives context for file_path. However, it does not explain the 'auto' default for live or what triggers each mode, leaving some parameter semantics implicit.

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-resource combination: 'Count words/characters/paragraphs, total and per heading section.' It clearly distinguishes itself from its sibling word_count_with_exclusions by naming that alternative and its use case. An agent can understand exactly what this tool computes.

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 gives explicit guidance on when to prefer a different tool: 'For journal counts that exclude references, captions, or other zones, use word_count_with_exclusions.' It also clarifies the two operational modes (live Word engine vs. file mode), so the agent can choose based on whether the document is open.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nometalalchemist/KitchenSink4Word'

If you have feedback or need assistance with the MCP directory API, please join our Discord server