Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions core/Microsoft.Mcp.Core/src/Commands/BaseCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ protected BaseCommand()
RegisterOptions(_command);
}

public virtual string Id { get; protected set; } = null!;
public virtual string Name { get; protected set; } = null!;
public virtual string Description { get; protected set; } = null!;
public virtual string Title { get; protected set; } = null!;
public virtual ToolMetadata Metadata { get; protected set; } = null!;
public string Id { get; protected set; } = null!;
public string Name { get; protected set; } = null!;
public string Description { get; protected set; } = null!;
public string Title { get; protected set; } = null!;
public ToolMetadata Metadata { get; protected set; } = null!;

public Command GetCommand() => _command;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ namespace Azure.Mcp.Tools.Acr.Commands.Registry;
Title = "List Container Registries",
Description = """
List Azure Container Registries in a subscription. Optionally filter by resource group. Each registry result
includes: name, location, loginServer, skuName, skuTier. If no registries are found the tool returns null results
(consistent with other list commands).
includes name, location, loginServer, skuName, skuTier.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Azure.Mcp.Tools.Acr.Commands.Registry;
Title = "List Container Registry Repositories",
Description = """
List repositories in Azure Container Registries. By default, lists repositories for all registries in the subscription.
You can narrow the scope using --resource-group and/or --registry to list repositories for a specific registry only.
You can narrow the scope using resource group and/or registry to list repositories for a specific registry only.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ public static class AcrOptionDefinitions
$"--{RegistryName}"
)
{
Description = "The name of the Azure Container Registry. This is the unique name you chose for your container registry."
Description = "The name of the Azure Container Registry."
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,25 @@

namespace Azure.Mcp.Tools.Advisor.Commands.Recommendation;

[CommandMetadata(
Id = "174fd0df-a11a-4139-b987-efd57611f62f",
Name = "apply",
Title = "Apply Advisor Recommendations",
Description = """
This tool helps in applying advisor recommendations on IaaC files (like ARM, Terraform) for Azure resources. It returns the rules that can be applied to the IaaC file.
""",
Destructive = false,
Idempotent = true,
OpenWorld = false,
ReadOnly = true,
LocalRequired = false,
Secret = false)]
public sealed class RecommendationApplyCommand(ILogger<RecommendationApplyCommand> logger) : BaseCommand<RecommendationApplyOptions>
{
private const string CommandTitle = "Apply Advisor Recommendations";
private readonly ILogger<RecommendationApplyCommand> _logger = logger;
private static readonly ConcurrentDictionary<string, string> s_advisorRecommendationRulesCache = new();
private static readonly Lazy<HashSet<string>> s_availableResources = new(LoadAvailableResources);

public override string Id => "174fd0df-a11a-4139-b987-efd57611f62f";

public override string Name => "apply";

public override string Description =>
@"This tool helps in applying advisor recommendations on IaaC files (like ARM, Terraform) for Azure resources. It returns the rules that can be applied to the IaaC file.";

public override string Title => CommandTitle;

public override ToolMetadata Metadata => new()
{
Destructive = false,
Idempotent = true,
OpenWorld = false,
ReadOnly = true,
LocalRequired = false,
Secret = false
};

protected override void RegisterOptions(Command command)
{
command.Options.Add(RecommendationApplyOptionDefinitions.Resource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Azure.Mcp.Tools.Aks.Commands.Cluster;
Id = "34e0d3d3-cbc5-4df8-8244-1439b97f3de5",
Name = "get",
Title = "Get Azure Kubernetes Service (AKS) Cluster Details",
Description = "List/enumerate all AKS (Azure Kubernetes Service) clusters in a subscription. Get/retrieve/show the details of a specific cluster if a name is provided.",
Description = "List/enumerate all AKS (Azure Kubernetes Service) clusters in a subscription. Get/retrieve/show the details of a specific cluster if a cluster name is provided.",
Destructive = false,
Idempotent = true,
OpenWorld = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Azure.Mcp.Tools.Aks.Commands.Nodepool;
Id = "9abb0904-2ffc-4aab-b4ea-fc454b6351b1",
Name = "get",
Title = "Get Azure Kubernetes Service (AKS) Node Pool Details",
Description = "List/enumerate all AKS (Azure Kubernetes Service) node pools in a cluster. Get/retrieve/show the details of a specific node pool if a name is provided.",
Description = "List/enumerate all AKS (Azure Kubernetes Service) node pools in a cluster. Get/retrieve/show the details of a specific node pool if a node pool name is provided.",
Destructive = false,
Idempotent = true,
OpenWorld = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ namespace Azure.Mcp.Tools.AppConfig.Commands.Account;
Name = "list",
Title = "List App Configuration Stores",
Description = """
List all App Configuration stores in a subscription. This command retrieves and displays all App Configuration
stores available in the specified subscription. Results include store names returned as a JSON array.
List all App Configuration stores in a subscription. Results include store names returned as a JSON array.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ namespace Azure.Mcp.Tools.AppConfig.Commands.KeyValue;
Name = "delete",
Title = "Delete App Configuration Key-Value Setting",
Description = """
Delete a key-value pair from an App Configuration store. This command removes the specified key-value pair from the store.
If a label is specified, only the labeled version is deleted. If no label is specified, the key-value with the matching
key and the default label will be deleted.
Delete a key-value pair from an App Configuration store. If a label is specified, only the labeled version is deleted.
If no label is specified, the key-value with the matching key and the default label will be deleted.
""",
Destructive = true,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ namespace Azure.Mcp.Tools.AppConfig.Commands.KeyValue;
Title = "Set App Configuration Key-Value Setting",
Description = """
Set a key-value setting in an App Configuration store. This command creates or updates a key-value setting
with the specified value. You must specify an account name, key, and value. Optionally, you can specify a
label otherwise the default label will be used. You can also specify a content type to indicate how the value
should be interpreted. You can add tags in the format 'key=value' to associate metadata with the setting.
with the specified value. If no label is specified, the default label will be used.
""",
Destructive = true,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ namespace Azure.Mcp.Tools.AppConfig.Commands.KeyValue.Lock;
Name = "set",
Title = "Sets the lock state of an App Configuration Key-Value Setting",
Description = """
Sets the lock state of a key-value in an App Configuration store. This command can lock and unlock key-values.
Locking sets a key-value to read-only mode, preventing any modifications to its value. Unlocking removes the
read-only mode from a key-value setting, allowing modifications to its value. You must specify an account name
and key. Optionally, you can specify a label to lock or unlock a specific labeled version of the key-value.
Sets the lock state of a key-value in an App Configuration store. Locking a key-value sets it to read-only mode,
preventing any modifications to its value. Unlocking a key-value removes the read-only mode, allowing modifications
to its value. You can specify a label to lock or unlock a specific labeled version of the key-value.
Default is unlocking the key-value.
""",
Destructive = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ public static class AppConfigOptionDefinitions

public static readonly Option<string> Value = new($"--{ValueName}")
{
Description = "The value to set for the configuration key.",
Description = "The value to set for the key.",
Required = true
};

public static readonly Option<string> Label = new($"--{LabelName}")
{
Description = "The label to apply to the configuration key. Labels are used to group and organize settings.",
Description = "The label to apply to the key. Labels are used to group and organize settings.",
Required = false
};

public static readonly Option<string> ContentType = new($"--{ContentTypeName}")
{
Description = "The content type of the configuration value. This is used to indicate how the value should be interpreted or parsed.",
Description = "The content type of the value. This is used to indicate how the value should be interpreted or parsed.",
Required = false
};

public static readonly Option<string[]> Tags = new($"--{TagsName}")
{
Description = "The tags to associate with the configuration key. Tags should be in the format 'key=value'. Multiple tags can be specified.",
Description = "The tags to associate with the key. Tags should be in the format 'key=value'. Multiple tags can be specified.",
Required = false,
AllowMultipleArgumentsPerToken = true
};
Expand All @@ -60,13 +60,13 @@ public static class AppConfigOptionDefinitions

public static readonly Option<string> KeyFilter = new($"--{KeyFilterName}")
{
Description = "Specifies the key filter, if any, to be used when retrieving key-values. The filter can be an exact match, for example a filter of 'foo' would get all key-values with a key of 'foo', or the filter can include a '*' character at the end of the string for wildcard searches (e.g., 'App*'). If omitted all keys will be retrieved.",
Description = "Specifies the key filter used when retrieving key-values. The filter can be an exact match, for example a filter of 'foo' would get all key-values with a key of 'foo', or the filter can include a '*' character at the end of the string for wildcard searches (e.g., 'App*'). If omitted all keys will be retrieved.",
Required = false
};

public static readonly Option<string> LabelFilter = new($"--{LabelFilterName}")
{
Description = "Specifies the label filter, if any, to be used when retrieving key-values. The filter can be an exact match, for example a filter of 'foo' would get all key-values with a label of 'foo', or the filter can include a '*' character at the end of the string for wildcard searches (e.g., 'Prod*'). This filter is case-sensitive. If omitted, all labels will be retrieved.",
Description = "Specifies the label filter used when retrieving key-values. The filter can be an exact match, for example a filter of 'foo' would get all key-values with a label of 'foo', or the filter can include a '*' character at the end of the string for wildcard searches (e.g., 'Prod*'). This filter is case-sensitive. If omitted, all labels will be retrieved.",
Required = false
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class KeyValueLockSetOptions : ISubscriptionOption
[Option("The name of the key to access within the App Configuration store.")]
public required string Key { get; set; }

[Option("The label to apply to the configuration key. Labels are used to group and organize settings.")]
[Option("The label to apply to the key. Labels are used to group and organize settings.")]
public string? Label { get; set; }

[Option(OptionDescriptions.Tenant)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ namespace Azure.Mcp.Tools.AppService.Commands.Database;
Name = "add",
Title = "Add Database to App Service",
Description = """
Add a database connection for an App Service using connection string for an existing database. This command configures database connection
settings for the specified App Service, allowing it to connect to a database server name. You must specify the App Service name, database name,
database type, database server name, connection string, resource group name and subscription.
Add a database connection for an App Service using connection string for an existing database,
allowing it to connect to a database server name.
""",
Destructive = false,
Idempotent = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ namespace Azure.Mcp.Tools.AppService.Commands.Webapp;
Description = """
Retrieves detailed information about Azure App Service web apps, including app name, resource group, location,
state, hostnames, etc. If a specific app name is not provided, the command will return details for all web apps
in a subscription or resource group in a subscription. You can specify the app name, resource group name, and
subscription to get details for a specific web app.
in a subscription or resource group. You can specify the app name, resource group name, and subscription to get
details for a specific web app.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Azure.Mcp.Tools.ApplicationInsights.Commands.Recommendation;
Name = "list",
Title = "List Application Insights Recommendations",
Description = """
List Application Insights Code Optimization Recommendations in a subscription. Optionally filter by resource group when --resource-group is provided.
List Application Insights Code Optimization Recommendations in a subscription or resource group.
Returns the code optimization recommendations based on the profiler data.
""",
Destructive = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ namespace Azure.Mcp.Tools.Authorization.Commands;
Name = "list",
Title = "List Role Assignments",
Description = """
List role assignments. This command retrieves and displays all Azure RBAC role assignments
in the specified scope. Results include role definition IDs and principal IDs, returned as a JSON array.
List all Azure RBAC role assignments in the specified scope. Results include role definition IDs and principal IDs, returned as a JSON array.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ namespace Azure.Mcp.Tools.AzureBackup.Commands.Backup;
Description = """
Checks the backup status of an Azure resource and returns whether it is protected,
along with vault and policy details. Use this to verify if a VM, disk, storage account,
or other datasource is currently backed up. Requires the datasource ARM resource ID
and the Azure region (location) where the resource exists.
or other datasource is currently backed up.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
using Azure.Mcp.Tools.AzureBackup.Services;
using Microsoft.Extensions.Logging;
using Microsoft.Mcp.Core.Commands;
using Microsoft.Mcp.Core.Extensions;
using Microsoft.Mcp.Core.Models.Command;
using Microsoft.Mcp.Core.Models.Option;

namespace Azure.Mcp.Tools.AzureBackup.Commands.DisasterRecovery;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ namespace Azure.Mcp.Tools.AzureBackup.Commands.Job;
Name = "get",
Title = "Get Backup Job",
Description = """
Retrieves backup job information. When --job is specified, returns detailed information
about a single job including operation type, status, start/end times, error codes, and
datasource details. When omitted, lists all backup jobs in the vault.
Gets backup job information. When job is specified, gets the specific job, otherwise gets all backup jobs in the vault.
Returns operation type, status, start/end times, error codes, and datasource details.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ namespace Azure.Mcp.Tools.AzureBackup.Commands.Policy;
Name = "get",
Title = "Get Backup Policy",
Description = """
Retrieves backup policy information. When --policy is specified, returns detailed
information about a single policy including datasource types and protected items count.
When omitted, lists all backup policies configured in the vault.
Gets backup policy information. When policy is specified, gets the specific policy, otherwise gets all backup
policies configured in the vault.
Returns datasource types and protected items count.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Lists items that can be backed up (protectable items) in a Recovery Services vau
such as SQL databases and SAP HANA databases discovered on registered VMs.
Use this to find databases and workloads available for backup protection.
Only supported for RSV vaults; DPP datasources are protected by ARM resource ID directly.
Filter results by --workload-type (e.g., SQL, SAPHana) or --container.
Filter results by workload-type (e.g., SQL, SAPHana) or container.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ namespace Azure.Mcp.Tools.AzureBackup.Commands.ProtectedItem;
Name = "get",
Title = "Get Protected Item",
Description = """
Retrieves protected item information. When --protected-item is specified, returns
detailed information about a single backup instance including protection status,
datasource details, policy assignment, and last backup time. Specify --container
for RSV workload items. When --protected-item is omitted, lists all protected items
(backup instances) in the vault.
Gets protected item (backup instances) information. When protected-item is specified, gets the specific protected item,
otherwise gets all protected items in the vault.
Returns protection status, datasource details, policy assignment, and last backup time.
Specify container for RSV workload items.
""",
Destructive = false,
Idempotent = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ namespace Azure.Mcp.Tools.AzureBackup.Commands.ProtectedItem;
Name = "protect",
Title = "Protect Resource",
Description = """
Enables or configures backup protection for an Azure resource by creating a
protected item or backup instance. Protects VMs, disks, file shares, SQL databases,
SAP HANA databases, and other supported datasources.
For VMs: pass the VM ARM resource ID as --datasource-id.
Enables or configures backup protection for an Azure resource by creating a protected item or backup instance.
Protects VMs, disks, file shares, SQL databases, SAP HANA databases, and other supported datasources.
For VMs: pass the VM ARM resource ID as datasource-id.
For workloads (SQL/HANA): pass the protectable item name from 'protectableitem list'
as --datasource-id (e.g., 'SAPHanaDatabase;instance;dbname'), and specify --container.
Requires a backup policy name via --policy. The operation is asynchronous;
as datasource-id (e.g., 'SAPHanaDatabase;instance;dbname'), and specify container.
Requires a backup policy name via policy. The operation is asynchronous;
use 'azurebackup job get' to monitor the protection job progress.
""",
Destructive = true,
Expand Down
Loading
Loading