Skip to content

Conversation

sharedferret
Copy link

What does this PR do?

This PR replaces the mcp redis cache list and mcp redis cluster list commands with a unified mcp redis list command to return data on all Redis resources in the subscription. Previously, the mcp redis cache list returned data on Azure Cache for Redis and Azure Redis Enterprise resources, and mcp 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 and azmcp redis cluster database list into mcp 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

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md

Copy link
Contributor

@Copilot Copilot AI left a 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

@sharedferret
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

@sharedferret sharedferret force-pushed the redis-list-all-caches branch from 08daabb to c246846 Compare October 10, 2025 16:59
@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Oct 10, 2025
@sharedferret sharedferret force-pushed the redis-list-all-caches branch from c246846 to 1e5a3ff Compare October 10, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants