Skip to main content
Glama

fast_get_disk_usage

Check disk usage information for any specified path to monitor storage consumption and manage filesystem capacity.

Instructions

Gets disk usage information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to check/

Implementation Reference

  • api/server.ts:207-216 (registration)
    Tool registration in MCP_TOOLS array including name, description, and input schema.
    {
      name: 'fast_get_disk_usage',
      description: '디스크 사용량을 조회합니다',
      inputSchema: {
        type: 'object',
        properties: {
          path: { type: 'string', description: '조회할 경로', default: '/' }
        }
      }
    },
  • Input schema defining the 'path' parameter for disk usage query.
    inputSchema: {
      type: 'object',
      properties: {
        path: { type: 'string', description: '조회할 경로', default: '/' }
      }
    }
  • api/server.ts:344-346 (registration)
    Switch case in tools/call handler that registers and invokes the tool handler.
    case 'fast_get_disk_usage':
      result = await handleGetDiskUsage(args);
      break;
  • Main handler function that executes 'df -h' command to retrieve disk usage information for the specified path and parses the output into structured data.
    async function handleGetDiskUsage(args: any) {
      const { path: targetPath = '/' } = args;
      
      try {
        const { stdout } = await execAsync(`df -h "${targetPath}"`);
        const lines = stdout.split('\n').filter(line => line.trim());
        
        if (lines.length > 1) {
          const data = lines[1].split(/\s+/);
          return {
            filesystem: data[0],
            total: data[1],
            used: data[2],
            available: data[3],
            use_percentage: data[4],
            mounted_on: data[5],
            path: targetPath,
            timestamp: new Date().toISOString()
          };
        }
      } catch {
        // Fallback for systems without df command
      }
      
      return {
        error: 'Unable to get disk usage information',
        path: targetPath,
        timestamp: new Date().toISOString()
      };
    }
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose permissions needed, whether it's read-only (implied by 'Gets' but not explicit), rate limits, output format, or error handling, leaving significant gaps for a tool that accesses system data.

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 extremely concise with a single sentence 'Gets disk usage information', which is front-loaded and wastes no words. It efficiently conveys the core purpose without unnecessary elaboration, earning a high score for brevity and clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple but potentially system-impacting tool (disk usage queries), the description is incomplete. It lacks details on return values, error cases, or behavioral constraints, making it inadequate for safe and effective use by an agent in a file management context.

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% with one parameter ('path') well-documented in the schema. The description adds no parameter semantics beyond what the schema provides, but since coverage is high, the baseline score of 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Gets disk usage information' clearly states the verb ('Gets') and resource ('disk usage information'), making the purpose understandable. However, it's vague about scope (e.g., system-wide vs. specific path) and doesn't distinguish from siblings like 'fast_get_directory_tree' or 'fast_find_large_files', which might overlap in disk-related queries.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, exclusions, or compare to siblings like 'fast_get_directory_tree' for structural info or 'fast_find_large_files' for size-based filtering, leaving the agent to infer usage context.

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/efforthye/fast-filesystem-mcp'

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