Skip to main content
Glama

fast_get_disk_usage

Retrieve disk usage statistics for specified directories on the fast-filesystem-mcp server. Optimized for reliability and multi-block operations.

Instructions

디스크 사용량을 조회합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo조회할 경로/

Implementation Reference

  • The handler function that implements the 'fast_get_disk_usage' tool. It uses the 'df -h' shell command to retrieve disk usage information for the specified path, parsing the output to return formatted results including filesystem, total/used/available space, usage percentage, and mount point.
    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() }; }
  • The tool definition including name, description, and input schema. The schema specifies an optional 'path' parameter (string, defaults to '/'). This is part of the MCP_TOOLS array used for tool listing.
    { name: 'fast_get_disk_usage', description: '디스크 사용량을 조회합니다', inputSchema: { type: 'object', properties: { path: { type: 'string', description: '조회할 경로', default: '/' } } } },
  • api/server.ts:344-346 (registration)
    Registration in the tools/call handler switch statement, which dispatches tool calls to the corresponding handler function.
    case 'fast_get_disk_usage': result = await handleGetDiskUsage(args); break;

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