Add IsServerCommandInvoked telemetry tag#751
Merged
conniey merged 9 commits intomicrosoft:mainfrom Oct 13, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new telemetry tag IsServerCommandInvoked to track whether a tool call resulted in an actual command execution or was used for learning/discovery purposes. The tag is set to true by default when a tool is called and explicitly set to false in learning modes where commands aren't actually invoked.
Key changes:
- Adds the
IsServerCommandInvokedtag to telemetry constants - Sets the tag to
falsein learning/discovery scenarios across tool loaders - Updates tests to verify the new tag behavior
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| TelemetryConstants.cs | Adds the new IsCommandInvoked constant for the telemetry tag |
| McpRuntime.cs | Sets default value of true for the new tag when tools are called |
| SingleProxyToolLoader.cs | Sets tag to false in learning modes where no actual command is invoked |
| ServerToolLoader.cs | Sets tag to false in tool learning scenarios |
| NamespaceToolLoader.cs | Sets tag to false in tool learning scenarios |
| McpRuntimeTests.cs | Updates test helpers and adds assertions for the new tag behavior |
…r/Commands/Runtime/McpRuntimeTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…r/Commands/Runtime/McpRuntimeTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…r/Commands/Runtime/McpRuntimeTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
5d4067f to
e19df8c
Compare
alzimmermsft
approved these changes
Oct 13, 2025
colbytimm
pushed a commit
to colbytimm/microsoft-mcp
that referenced
this pull request
Dec 8, 2025
* Add IsServerCommandInvoked * Add tests * Update CHANGELOG * Update core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Run dotnet format. * Aggregate to a single line. * Rename constant. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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?
Adds a new tag,
IsServerCommandInvokedindicating that the tool call resulted in a command being invoked. Set to false when learning or finding new servers.GitHub issue number?
Fixes https://github.com/microsoft/mcp-pr/issues/124
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/servers/Azure.Mcp.Server/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/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline