Using ARG query to support Grafana resource read operations#628
Merged
ArthurMa1978 merged 6 commits intomainfrom Oct 1, 2025
Merged
Using ARG query to support Grafana resource read operations#628ArthurMa1978 merged 6 commits intomainfrom
ArthurMa1978 merged 6 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR eliminates the dependency on Azure.ResourceManager.Grafana in the Grafana tool by switching to Azure Resource Graph (ARG) queries for resource read operations. This change reduces the MCP agent size by approximately 587 KB while maintaining functionality.
Key changes:
- Replaced Azure.ResourceManager.Grafana SDK with ARG query implementation
- Converted the Workspace class to a record-based GrafanaWorkspace model
- Added new model classes for parsing ARG response data
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Azure.Mcp.Tools.Grafana.csproj | Removed Azure.ResourceManager.Grafana package dependency |
| Directory.Packages.props | Removed Azure.ResourceManager.Grafana version specification |
| GrafanaService.cs | Replaced SDK calls with ARG query implementation using BaseAzureResourceService |
| IGrafanaService.cs | Updated return type from Workspace to GrafanaWorkspace |
| GrafanaWorkspace.cs | New record-based model replacing the old Workspace class |
| ManagedGrafanaData.cs | New model for parsing ARG response data |
| ManagedGrafanaProperties.cs | New model for Grafana properties from ARG responses |
| WorkspaceListCommand.cs | Updated to use new GrafanaWorkspace model |
| GrafanaJsonContext.cs | Added JSON serialization support for new models |
| WorkspaceListCommandTests.cs | Updated test data to use new GrafanaWorkspace record syntax |
Comments suppressed due to low confidence (1)
tools/Azure.Mcp.Tools.Grafana/src/Services/Models/ManagedGrafanaProperties.cs:1
- The comment refers to 'Kusto cluster' but this is a Grafana properties class. It should read 'Properties of the Managed Grafana instance.'
// Copyright (c) Microsoft Corporation.
weng5e
approved these changes
Sep 30, 2025
alzimmermsft
approved these changes
Oct 1, 2025
colbytimm
pushed a commit
to colbytimm/microsoft-mcp
that referenced
this pull request
Dec 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR addresses part of the issue tracked in #226 by updating the Grafana tool to eliminate its dependency on Azure.ResourceManager.Grafana.
As a result, it reduces the MCP agent size by approximately 587 KB.
GitHub issue number?
#226
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentation/docs/azmcp-commands.mdand/or/docs/fabric-commands.mdToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline