Skip to main content
Glama
rog0x

@rog0x/mcp-file-tools

by rog0x

code_counter

Count lines of code in a directory, grouped by programming language, with breakdowns for total, code, comment, and blank lines to assess project size.

Instructions

Count lines of code by programming language: total lines, code lines, comment lines, blank lines (like cloc/scc).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dir_pathYesAbsolute path to the directory
max_depthNoMaximum depth to traverse (default: 10)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It names the four line types and per-language grouping but does not mention recursion behavior, file inclusion/exclusion rules, binary file handling, or output format. These are significant behavioral details for a directory-traversing tool.

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?

The description is a single, front-loaded sentence with no wasted words. The 'like cloc/scc' parenthetical adds a compact orienting reference without redundancy.

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?

With no output schema, the description names the output metrics and provides a known reference tool, which is helpful. However, it omits default traversal depth behavior, whether directories are recursed by default, and the shape of the returned result, leaving an agent with some open questions.

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%, so dir_path and max_depth are already documented in the schema. The tool description adds no parameter-level semantics, so the baseline of 3 applies—the schema does the work.

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 verb and resource: 'Count lines of code by programming language' and enumerates the exact metrics (total, code, comment, blank lines). The cloc/scc reference further clarifies the intent and clearly separates this tool from sibling file tools like dir_tree and file_stats.

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?

The description implies when to use the tool—when line-count statistics are needed—but it does not explicitly contrast this with dir_tree, file_stats, or file_search. There is no when-not-to-use statement, so the agent must infer the appropriate context from the purpose alone.

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/rog0x/mcp-file-tools'

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