You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/ReleaseNotes.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,13 @@ match criteria that factor into the result ordering. This will prevent them from
32
32
33
33
Added a new `--no-progress` command-line flag that disables all progress reporting (progress bars and spinners). This flag is universally available on all commands and takes precedence over the `visual.progressBar` setting. Useful for automation scenarios or when running WinGet in environments where progress output is undesirable.
34
34
35
+
### MCP `upgrade` support
36
+
37
+
The WinGet MCP server's existing tools have been extended with new parameters to support upgrade scenarios:
38
+
39
+
-**`find-winget-packages`** now accepts an `upgradeable` parameter (default: `false`). When set to `true`, it lists only installed packages that have available upgrades — equivalent to `winget upgrade`. The `query` parameter becomes optional in this mode, allowing it to filter results or be omitted to list all upgradeable packages. AI agents can use this to answer requests like "What apps can I update with WinGet?"
40
+
-**`install-winget-package`** now accepts an `upgradeOnly` parameter (default: `false`). When set to `true`, it only upgrades an already-installed package and returns a clear error if the package is not installed (pointing to `install-winget-package` without `upgradeOnly` instead). AI agents can use this to answer requests like "Update WinGetCreate" or, in combination with `find-winget-packages` with `upgradeable=true`, "Update all my apps."
41
+
35
42
### Authenticated GitHub API requests in PowerShell module
36
43
37
44
The PowerShell module now automatically uses `GH_TOKEN` or `GITHUB_TOKEN` environment variables to authenticate GitHub API requests. This significantly increases the GitHub API rate limit, preventing failures in CI/CD pipelines. Use `-Verbose` to see which token is being used.
Copy file name to clipboardExpand all lines: src/WinGetMCPServer/WingetPackageTools.cs
+70-16Lines changed: 70 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -34,23 +34,48 @@ public WingetPackageTools()
34
34
Title="Find WinGet Packages",
35
35
ReadOnly=true,
36
36
OpenWorld=false)]
37
-
[Description("Find installed and available packages using WinGet")]
37
+
[Description("Find installed and available packages using WinGet. To list all installed packages that have available upgrades (equivalent to 'winget upgrade'), call with upgradeable=true and no query. To filter upgradeable packages by name, call with upgradeable=true and a query. To search for packages to install, call with upgradeable=false and a required query.")]
38
38
publicCallToolResultFindPackages(
39
-
[Description("Find packages identified by this value")]stringquery)
39
+
[Description("Find packages identified by this value. Required when upgradeable is false; optionally filters results when upgradeable is true.")]string?query=null,
40
+
[Description("When true, only return installed packages that have available upgrades")]boolupgradeable=false)
40
41
{
41
42
try
42
43
{
43
44
ToolResponse.CheckGroupPolicy();
44
45
45
-
varcatalog=ConnectCatalog();
46
+
if(!upgradeable&&string.IsNullOrEmpty(query))
47
+
{
48
+
returnnewCallToolResult()
49
+
{
50
+
IsError=true,
51
+
Content=[newTextContentBlock(){Text="A query is required when upgradeable is false"}],
@@ -76,12 +115,13 @@ public CallToolResult FindPackages(
76
115
Destructive=true,
77
116
Idempotent=false,
78
117
OpenWorld=false)]
79
-
[Description("Install or update a package using WinGet")]
118
+
[Description("Install or upgrade a package using WinGet. When upgradeOnly is true, only upgrades an already-installed package and returns an error if it is not installed. When upgradeOnly is false (default), installs the package if not present or upgrades it if already installed.")]
80
119
publicasyncTask<CallToolResult>InstallPackage(
81
120
[Description("The identifier of the WinGet package")]stringidentifier,
82
121
IProgress<ProgressNotificationValue>progress,
83
122
CancellationTokencancellationToken,
84
-
[Description("The source containing the package")]string?source=null)
123
+
[Description("The source containing the package")]string?source=null,
124
+
[Description("When true, only upgrade an already-installed package; returns an error if the package is not installed")]boolupgradeOnly=false)
85
125
{
86
126
try
87
127
{
@@ -123,6 +163,12 @@ public async Task<CallToolResult> InstallPackage(
0 commit comments