Skip to main content
Glama
Smart File Reader MCP Server

Smart File Reader MCP Server

get_directory_size

Calculates the total size of a directory and returns the number of files and folders it contains, helping you assess folder storage use before reading or analyzing its contents.

Instructions

Calculate total folder size and return file and folder counts.

    Args:
        directory: Directory path to measure.
    

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_directory_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
directoryNo.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden. It does not state whether the measurement is recursive, how symlinks or permission errors are handled, or whether large trees are expensive; the only behavioral hint is that counts are included in the result. An output schema exists, so return shape need not be explained, but the operational traits are missing.

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

Conciseness3/5

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

The body is short and front-loaded with the purpose, which is good. However, it leaks a docstring 'Args:' block that merely restates the schema property instead of adding information, which is wasted 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 simple one-parameter tool with an output schema, the definition covers purpose and parameter identity adequately. It is still thin given zero annotation coverage, leaving recursive scope, defaults, and failure modes undocumented.

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 compensate for the single 'directory' parameter. It only repeats the obvious ('Directory path to measure') and says nothing about the '.' default, whether relative or absolute paths are accepted, or how paths are resolved.

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 and resource ('Calculate total folder size') plus what is returned ('file and folder counts'), so an agent can distinguish it from siblings like get_directory_tree or find_large_files on intent alone. It stops short of explicitly naming the alternative that would be chosen for related tasks.

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?

Contains no when-to-use or when-not-to-use guidance, and no reference to alternatives such as find_large_files (which presumably ranks sizes) or get_directory_tree (which returns structure). Usage is only inferable from the purpose sentence.

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