Skip to main content
Glama
carlosedp

Windows MCP Server

by carlosedp

Windows-drive-status

Retrieve used and free space details for a Windows drive, including total, used, and free capacity.

Instructions

Get status information about the used and free space in a Windows drive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
driveYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDrive name
used_spaceGBYesUsed space in GB
free_spaceGBYesFree space in GB

Implementation Reference

  • main.py:100-116 (handler)
    The handler function `get_drive_status` that implements the 'Windows-drive-status' tool. It normalizes the drive letter, checks existence, and returns used/free space in GB using utils._disk_usage_gb.
    def get_drive_status(drive: str) -> DriveInfo:
        """Get status information about the used and free space in a Windows drive."""
        import os
    
        try:
            # Normalize drive letter and construct root path
            drive_letter = drive.strip().upper().rstrip(':\\/')
            if len(drive_letter) != 1 or not drive_letter.isalpha():
                return DriveInfo(name=drive, used_spaceGB=0.0, free_spaceGB=0.0)
            root = f"{drive_letter}:\\"
            if not os.path.exists(root):
                return DriveInfo(name=drive_letter, used_spaceGB=0.0, free_spaceGB=0.0)
    
            used_gb, free_gb = utils._disk_usage_gb(root)
            return DriveInfo(name=drive_letter, used_spaceGB=used_gb, free_spaceGB=free_gb)
        except Exception:
            return DriveInfo(name=drive, used_spaceGB=0.0, free_spaceGB=0.0)
  • main.py:13-17 (schema)
    The `DriveInfo` Pydantic model used as the return type for the handler, defining name, used_spaceGB, and free_spaceGB fields.
    class DriveInfo(BaseModel):
        """Model for drive information."""
        name: str = Field(description="Drive name")
        used_spaceGB: float = Field(description="Used space in GB")
        free_spaceGB: float = Field(description="Free space in GB")
  • main.py:96-98 (registration)
    The `@mcp.tool` decorator that registers the 'Windows-drive-status' tool with FastMCP, including its name and description.
    @mcp.tool(
            name="Windows-drive-status",
            description="Get status information about the used and free space in a Windows drive",
  • The helper utility `_disk_usage_gb` called by the handler to compute used and free disk space in GB using shutil.disk_usage.
    def _disk_usage_gb(root: str) -> tuple[float, float]:
        """Return used and free space in GB for a given root like 'C:\\'."""
        import shutil
    
        total, used, free = shutil.disk_usage(root)
        gb = 1024 ** 3
        return used / gb, free / gb
Behavior2/5

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

With no annotations provided, the description bears full responsibility for disclosing behavioral traits. It only states it gets status info, but does not mention any potential side effects, permissions required, or behavior on invalid input. The read-only nature is implied but not explicitly stated.

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 a single concise sentence with no redundant information. It is front-loaded and efficiently communicates the core purpose.

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

Completeness4/5

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

Given the tool's simplicity and the presence of an output schema, the description is reasonably complete. It specifies the key information (used/free space) and leaves return format to the output schema. However, it could mention that the drive parameter represents a drive letter or path.

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

Parameters1/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 undocumented 'drive' parameter. However, it provides no format guidance (e.g., 'C:' vs 'C:\'), allowed values, or examples. The mention of 'used and free space' is the only hint at what the parameter enables.

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?

The description clearly states it gets status information about used and free space in a Windows drive, which is a specific verb and resource. It somewhat distinguishes from sibling tools like 'Windows-drives' (which likely lists drives) and 'Windows-drives-status-simple' (possibly a simpler version), but could be more explicit about the differentiation.

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 like 'Windows-drives-status-simple' or 'Windows-drives'. There is no mention of prerequisites, context, or exclusions.

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/carlosedp/windows-mcp-server'

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