Skip to main content
Glama
DynamicEndpoints

PowerShell Exec MCP Server

get_running_services

Retrieve and filter currently running services on Windows systems by name or status for system monitoring and management tasks.

Instructions

Get information about running services.

Args:
    name: Filter services by name (supports wildcards)
    status: Filter by status (Running, Stopped, etc.)
    timeout: Command timeout in seconds (1-300, default 60)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
statusNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function that implements the get_running_services tool by constructing and executing a filtered PowerShell 'Get-Service' command, returning JSON-formatted service information.
    @mcp.tool()
    async def get_running_services(name: Optional[str] = None, status: Optional[str] = None, timeout: Optional[int] = 60) -> str:
        """Get information about running services.
        
        Args:
            name: Filter services by name (supports wildcards)
            status: Filter by status (Running, Stopped, etc.)
            timeout: Command timeout in seconds (1-300, default 60)
        """
        code = "Get-Service"
        filters = []
        if name:
            filters.append(f"Name -like '{name}'")
        if status:
            filters.append(f"Status -eq '{status}'")
        if filters:
            code = f"{code} | Where-Object {{ {' -and '.join(filters)} }}"
        code = f"{code} | Select-Object Name, DisplayName, Status, StartType"
        return await execute_powershell(format_json_output(code), timeout)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions a timeout parameter but doesn't explain what happens on timeout, whether the tool requires admin privileges, if it's read-only, or what format the returned information takes. This leaves significant behavioral gaps for a tool that interacts with system services.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized, with a clear purpose statement followed by parameter details. Every sentence adds value, though the parameter explanations could be slightly more integrated into the flow rather than listed as bullet points.

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

Completeness3/5

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

Given that there's an output schema (which handles return values), no annotations, and the description compensates well for the 0% schema coverage, the description is moderately complete. However, it lacks behavioral context like permission requirements or error handling, which is important for a system tool.

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 description adds substantial value beyond the input schema, which has 0% description coverage. It explains that 'name' supports wildcards, 'status' accepts values like 'Running' and 'Stopped', and 'timeout' has a range and default, effectively documenting all three parameters that the schema leaves undescribed.

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 the tool's purpose with a specific verb ('Get information') and resource ('running services'), making it immediately understandable. However, it doesn't differentiate this tool from its siblings like 'get_processes' or 'get_event_logs' beyond the resource type, which prevents a perfect score.

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. It doesn't mention sibling tools like 'get_processes' or 'get_event_logs', nor does it specify scenarios where this tool is preferred or excluded, leaving usage context unclear.

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/DynamicEndpoints/PowerShell-Exec-MCP-Server'

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