-
Notifications
You must be signed in to change notification settings - Fork 227
Add mcp_redis_list
to return details on Redis cache resources
#760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR unifies Redis listing commands by replacing the separate mcp redis cache list
and mcp redis cluster list
commands with a single mcp redis list
command. The unified command returns all Redis resources in a subscription including Azure Cache for Redis, Azure Redis Enterprise, and Azure Managed Redis resources, with access policy and database information flattened into the main response.
- Consolidates three separate list commands into one unified Redis resource listing command
- Flattens access policy assignments and databases into the main resource response
- Updates service layer to aggregate all Redis resource types into a single response model
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ResourceListCommandTests.cs | Adds comprehensive unit tests for the new unified Redis list command |
DatabaseListCommandTests.cs | Removes tests for the deprecated database list command |
ClusterListCommandTests.cs | Removes tests for the deprecated cluster list command |
CacheListCommandTests.cs | Removes tests for the deprecated cache list command |
AccessPolicyListCommandTests.cs | Removes tests for the deprecated access policy list command |
RedisCommandTests.cs | Updates live tests to use the new unified command and response structure |
RedisService.cs | Refactors service to aggregate all Redis resource types into a single method |
IRedisService.cs | Simplifies interface to expose single unified list method |
RedisSetup.cs | Updates DI registration to register only the unified command |
RedisOptionDefinitions.cs | Simplifies option definitions for the unified approach |
Resource.cs | Adds new unified resource model combining properties from all Redis types |
ResourceListCommand.cs | Implements the new unified Redis list command |
RedisJsonContext.cs | Updates JSON serialization context for the new response model |
@microsoft-github-policy-service agree company="Microsoft" |
08daabb
to
c246846
Compare
tools/Azure.Mcp.Tools.Redis/src/Commands/ResourceListCommand.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Redis/src/Commands/ResourceListCommand.cs
Outdated
Show resolved
Hide resolved
c246846
to
1e5a3ff
Compare
1e5a3ff
to
ea0cbce
Compare
What does this PR do?
This PR replaces the
mcp redis cache list
andmcp redis cluster list
commands with a unifiedmcp redis list
command to return data on all Redis resources in the subscription. Previously, themcp redis cache list
returned data on Azure Cache for Redis and Azure Redis Enterprise resources, andmcp redis cluster list
returned data on Azure Managed Redis resources. This change updates the list command to return AMR, Enterprise, and ACR resources in a single command.This change additionally flattens the responses from
mcp redis cache accesspolicy list
andazmcp redis cluster database list
intomcp redis list
, so that the main list command returns all details for the Redis resources in a user's subscription as a single command.ToolDescriptionEvaluator scores for the unified command are as follows:
Test 288: 0.810504 (1st)
Test 289: 0.685128 (1st)
Test 290: 0.781228 (1st)
Test 291: 0.572767 (1st)
Test 292: 0.478070 (1st)
GitHub issue number?
#756
#757
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.md
and/orservers/Fabric.Mcp.Server/CHANGELOG.md
for product changes (features, bug fixes, UI/UX, updated dependencies
)servers/Azure.Mcp.Server/README.md
and/orservers/Fabric.Mcp.Server/README.md
documentation/servers/Azure.Mcp.Server/docs/azmcp-commands.md
and/or/docs/fabric-commands.md
ToolDescriptionEvaluator
and obtained a score of0.4
or more and a top 3 ranking for all related test prompts/servers/Azure.Mcp.Server/docs/e2eTestPrompts.md