Skip to main content
Glama
carlosedp

Windows MCP Server

by carlosedp

Windows-drives-status-simple

Retrieve status for specific Windows drives by inputting a comma-separated list of drive letters like 'C,D,F'.

Instructions

Get status for specific drives using a comma-separated drive letters as string (e.g., 'C,D,F')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
drives_stringYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:118-126 (handler)
    The tool handler function 'get_drives_status_simple' that executes the logic. It parses a comma-separated string of drive letters, calls the existing 'get_drive_status' for each drive, and returns a list of DriveInfo.
    @mcp.tool(
            name="Windows-drives-status-simple",
            description="Get status for specific drives using a comma-separated drive letters as string (e.g., 'C,D,F')",
    )
    def get_drives_status_simple(drives_string: str) -> list[DriveInfo]:
        """Get status for specific drives using a comma-separated drive letters as string (e.g., 'C,D,F')"""
        # Parse the comma-separated string into a list
        drives = [drive.strip().rstrip(':') for drive in drives_string.split(',')]
        return [get_drive_status(drive) for drive in drives if drive]
  • main.py:118-121 (registration)
    The @mcp.tool decorator that registers the tool with name 'Windows-drives-status-simple' and its description.
    @mcp.tool(
            name="Windows-drives-status-simple",
            description="Get status for specific drives using a comma-separated drive letters as string (e.g., 'C,D,F')",
    )
  • main.py:13-17 (schema)
    The DriveInfo Pydantic model used as the return type (list[DriveInfo]) for the tool.
    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")
  • The 'get_drive_status' helper function called by the tool to get status for a single drive.
    @mcp.tool(
            name="Windows-drive-status",
            description="Get status information about the used and free space in a Windows drive",
    )
    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)
  • The '_disk_usage_gb' utility function used by 'get_drive_status' to calculate used/free space in GB.
    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?

No annotations provided, so description carries full burden. It only states 'Get status' without disclosing side effects, permissions, or read/write nature. Minimal behavioral disclosure.

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?

Single sentence, no extra words, front-loaded with key info.

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?

Simple tool with one param and output schema; description adequately covers input format. Minor gap: does not explain what 'status' includes, but output schema likely covers that.

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?

Schema description coverage is 0%, but description adds crucial meaning: comma-separated string and example, which is not present in the schema.

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

Purpose5/5

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

The description clearly states the tool gets status for specific drives, specifying the input format (comma-separated letters). It distinguishes from siblings like 'Windows-drives' (likely all drives) and 'Windows-drive-status' (singular).

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 on when to use this tool versus alternatives like 'Windows-drives' or 'Windows-drive-status'. No mention of prerequisites 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