Repository navigation
.NET [Breaking]: Remove old MCP skill functionality - #9655
SergeyMenshykh merged 6 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Removal of public options and legacy discovery needs maintainer confirmation of migration impact and passing MCP regression tests.
No open issues 🎉
What changed in this PR
This PR simplifies .NET MCP skill support in Agent Framework by removing legacy index and archive discovery and consolidating the retained skills/list implementation.
Changes:
- Remove
skill://index.jsonloading, archive extraction, archive options, and obsolete tests. - Move discovery into
AgentMcpSkillsSource, caching intoMcpSkillsLoader, and retained types out ofListedfolders. - Update documentation and tests for extension-required discovery while preserving resource validation and cache behavior.
| File | Description |
|---|---|
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/McpSkillsLoaderTests.cs |
Rename cache tests for the consolidated loader. |
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/AgentMcpSkillTests.cs |
Update resource-access tests to renamed types. |
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/AgentMcpSkillsTests.Ttl.cs |
Exercise expiration, concurrency, and disposal through the source. |
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/AgentMcpSkillsTests.cs |
Adapt discovery tests and verify no legacy fallback. |
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/AgentMcpSkillsSourceTests.cs |
Remove obsolete index-based tests. |
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/AgentMcpSkillsSourceArchiveTests.cs |
Remove archive-loading and extraction tests. |
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/AgentMcpSkillsSerializationTests.cs |
Update serialization tests to renamed models. |
dotnet/tests/Microsoft.Agents.AI.Mcp.UnitTests/Skills/AgentMcpSkillsDiscoverySelectionTests.cs |
Verify absent extensions cause no discovery requests. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/McpSkillsSnapshot.cs |
Rename the cached catalog snapshot. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/McpSkillsPageLifetime.cs |
Rename the page-lifetime model. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/McpSkillsLoader.cs |
Retain expiration-based caching under the loader name. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/McpSkillsListResult.cs |
Remove Listed from discovery model names. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/McpSkillsJsonContext.cs |
Update generated serialization registrations. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/McpSkillIndex.cs |
Remove legacy index models. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/McpJsonContext.cs |
Remove legacy index serialization context. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/SkillMdEntryLoader.cs |
Remove index-based Markdown loading. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/IMcpSkillEntryLoader.cs |
Remove the index-entry loader abstraction. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/ArchiveFormat.cs |
Remove archive format definitions. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/ArchiveEntryLoader.cs |
Remove archive download and reconciliation. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Loaders/AgentMcpSkillArchiveExtractor.cs |
Remove local archive extraction. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Listed/McpListedSkillsLoader.cs |
Remove discovery implementation relocated into the source. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Listed/AgentMcpListedSkillResource.cs |
Remove the old location of the retained resource implementation. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/Listed/AgentMcpListedSkill.cs |
Remove the old location of the retained skill implementation. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/AgentSkillsProviderBuilderMcpExtensions.cs |
Document extension-only discovery and updated security considerations. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/AgentMcpSkillsSourceOptions.cs |
Remove public archive-specific options. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/AgentMcpSkillsSource.cs |
Own discovery and validation; remove index fallback. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/AgentMcpSkillResource.cs |
Adopt the retained verified-resource implementation. |
dotnet/src/Microsoft.Agents.AI.Mcp/Skills/AgentMcpSkill.cs |
Adopt the retained manifest-bound skill implementation. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (5 commit(s)): dc7c91926148, e7340a8b5a89, 83c1749ce856, 2eb91b86da35, f4cd0be1d4f4
Model: gpt-5.6-sol
Overview
The refactor cleanly consolidates the retained skills/list path and preserves strong pagination, integrity, path-safety, caching, cancellation, and ownership guardrails. One compatibility gap remains: the new extension-only selection disables the repository's documented Foundry Toolbox integration unless the first-party endpoint and callers are migrated in lockstep.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.
Affected areas: dotnet/src/Microsoft.Agents.AI.Mcp/Skills/AgentMcpSkillsSource.cs
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Motivation
Simplify the MCP skills implementation by removing the old discovery path and consolidating the remaining code. The refactoring introduces no behavioral changes to the retained
skills/listfunctionality.Description
skill://index.jsonskill loading, archive extraction, and archive-specific options.Listedfolders and removeListedfrom class and file names.AgentMcpSkillsSourceand caching intoMcpSkillsLoader.skills/listlogic, comments, and style without behavior changes.