Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

get_disk_info

Retrieve disk information on Windows systems to monitor storage capacity, usage, and drive details for system management.

Instructions

获取磁盘信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that runs a PowerShell command to retrieve disk information (drives, total/used/free GB, percent used) and parses the JSON output.
    async getDiskInfo() {
      try {
        const command = `
          Get-PSDrive -PSProvider FileSystem | Where-Object { $_.Used -ne $null } | ForEach-Object {
            @{
              Drive = $_.Name
              TotalGB = [math]::Round($_.Used / 1GB + $_.Free / 1GB, 2)
              UsedGB = [math]::Round($_.Used / 1GB, 2)
              FreeGB = [math]::Round($_.Free / 1GB, 2)
              PercentUsed = [math]::Round(($_.Used / ($_.Used + $_.Free)) * 100, 2)
            }
          } | ConvertTo-Json
        `;
    
        const { stdout } = await execAsync(`powershell -Command "${command.replace(/"/g, '\\"')}"`, {
          shell: 'powershell.exe'
        });
    
        let disks = JSON.parse(stdout);
        if (!Array.isArray(disks)) {
          disks = [disks];
        }
    
        return { success: true, disks };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Tool registration in getToolDefinitions(): defines name, description, and empty input schema for get_disk_info.
    {
      name: 'get_disk_info',
      description: '获取磁盘信息',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • In executeTool switch statement: dispatches 'get_disk_info' calls to the getDiskInfo() handler method.
    case 'get_disk_info':
      return await this.getDiskInfo();
  • In canHandle(): includes 'get_disk_info' in the list of supported tools.
    const tools = ['run_powershell', 'run_cmd', 'get_system_info', 
                   'get_disk_info', 'get_network_info'];
    return tools.includes(toolName);
  • Input schema definition: object with no properties (no input parameters required).
    inputSchema: {
      type: 'object',
      properties: {},
    },
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 states the action ('获取磁盘信息') but doesn't describe any behavioral traits such as whether it's read-only, what permissions are required, potential side effects, or output format. For a tool with zero annotation coverage, this is a significant gap in transparency.

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—a single phrase that directly states the tool's function. There is no wasted verbiage or unnecessary elaboration, making it front-loaded and efficient. Every word earns its place by conveying the core purpose.

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 the tool's complexity (simple read operation with no parameters) and the lack of annotations and output schema, the description is incomplete. It doesn't explain what disk information is returned (e.g., usage stats, partition details) or any behavioral context, leaving the agent with insufficient information to understand the tool's full scope and output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100% (since there are no parameters to describe). In such cases, the baseline score is 4, as there are no parameters for the description to compensate for. The description doesn't need to add parameter semantics beyond what the schema provides.

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

Purpose2/5

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

The description '获取磁盘信息' (Get disk information) is a tautology that essentially restates the tool name 'get_disk_info'. While it correctly identifies the resource (disk), it lacks specificity about what information is retrieved (e.g., usage, partitions, capacity) and doesn't distinguish this tool from sibling tools like 'get_system_info' or 'get_network_info'. The purpose is clear but overly vague.

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?

The description provides no guidance on when to use this tool versus alternatives. There is no mention of context, prerequisites, or exclusions. Given sibling tools like 'get_system_info' that might overlap in functionality, the lack of differentiation leaves the agent without clear usage instructions.

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/eva-wanxin-git/windows-automation-mcp'

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