Skip to main content
Glama

list_modules

Discover installed PowerShell modules on Windows systems, enabling easy management and retrieval of module information for streamlined scripting and system administration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Inline handler and registration for the 'list_modules' tool. Executes PowerShell command 'Get-Module -ListAvailable | Select-Object Name, Version, ModuleType, Path | Sort-Object Name | ConvertTo-Json' to list available modules and returns the JSON output as text content.
    this.server.tool('list_modules', {}, async () => { try { const command = ` Get-Module -ListAvailable | Select-Object Name, Version, ModuleType, Path | Sort-Object Name | ConvertTo-Json `; const { stdout, stderr } = await execAsync( `powershell -Command "${command.replace(/"/g, '\\"')}"` ); if (stderr) { return { isError: true, content: [ { type: 'text' as const, text: `Error listing PowerShell modules: ${stderr}`, }, ], }; } return { content: [ { type: 'text' as const, text: stdout, }, ], }; } catch (error) { return { isError: true, content: [ { type: 'text' as const, text: `Error listing PowerShell modules: ${(error as Error).message}`, }, ], }; } });

Other Tools

Related 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/posidron/mcp-powershell'

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