Skip to content

Add mcp_redis_list to return details on Redis cache resources#760

Merged
sharedferret merged 1 commit intomicrosoft:mainfrom
sharedferret:redis-list-all-caches
Oct 13, 2025
Merged

Add mcp_redis_list to return details on Redis cache resources#760
sharedferret merged 1 commit intomicrosoft:mainfrom
sharedferret:redis-list-all-caches

Conversation

@sharedferret
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
@sharedferret
Copy link
Copy Markdown
Contributor 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
Comment thread tools/Azure.Mcp.Tools.Redis/src/Commands/ResourceListCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Redis/src/Commands/ResourceListCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
@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
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs Outdated
@joshfree joshfree added this to the 2025-11 milestone Oct 12, 2025
@joshfree joshfree added server-Azure.Mcp Azure.Mcp.Server tools-Redis Do Not Merge Do Not Merge / WIP PRs labels Oct 12, 2025
@joshfree joshfree removed the Do Not Merge Do Not Merge / WIP PRs label Oct 12, 2025
@joshfree
Copy link
Copy Markdown
Member

@sharedferret can you get this merged very early Monday AM? If not, let's hold off on changes until after the October stabilization period.

@sharedferret
Copy link
Copy Markdown
Contributor Author

sharedferret commented Oct 12, 2025 via email

@sharedferret sharedferret enabled auto-merge (squash) October 13, 2025 05:44
Comment thread servers/Azure.Mcp.Server/CHANGELOG.md
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs
Comment thread tools/Azure.Mcp.Tools.Redis/src/Services/RedisService.cs
@sharedferret sharedferret merged commit d2656c3 into microsoft:main Oct 13, 2025
26 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Oct 13, 2025
@alzimmermsft alzimmermsft mentioned this pull request Oct 9, 2025
7 tasks
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants