Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Get Disk & Directory Usage

fs_disk_usage

Check disk capacity and directory usage statistics for a given path, including file count, folder count, and total bytes, to assess storage consumption.

Instructions

查看指定路径所在分区的磁盘容量与目录占用统计(文件数、文件夹数、总字节数)。

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": {
      "path": "<path>"
    },
    "name": "fs_disk_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes目标文件或目录路径
maxFilesNo统计目录时的最大扫描文件数

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does reveal what statistics come back (file count, folder count, bytes) and that partition capacity is reported for the containing filesystem, but it says nothing about the cost of scanning large trees, permission requirements, or what happens when the scan hits the maxFiles cap.

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 compact sentence that front-loads the primary result (partition capacity) before the secondary statistics. Every clause carries information; only the parenthetical enumeration adds minor bulk.

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 usefully enumerates the returned statistics, which is the main thing an agent needs. However, with no annotations it should also cover truncation behavior and scan cost for a potentially expensive directory walk, leaving the definition adequate but not complete.

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 coverage is 100%, so both parameters are already documented, setting the baseline at 3. The description does add a little meaning by clarifying that the path determines which partition's capacity is reported, but it adds nothing about maxFiles' truncation effect.

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: viewing the disk capacity of the partition containing a given path plus directory usage statistics (files, folders, total bytes). This is clearly distinguishable from siblings like fs_list_directory or fs_get_info, which don't report partition capacity. It only lacks an explicit contrast with those siblings.

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 stated outputs imply when the tool is useful (measuring disk space or directory size), but there is no explicit guidance on when to prefer it over fs_tree, fs_list_directory, or fs_get_info, and no prerequisites or exclusions are mentioned. Usage is inferable rather than stated.

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