.NET: Add Hosted-ToolboxMcpSkills sample#6175
Merged
semenshi merged 6 commits intoJun 2, 2026
Merged
Conversation
Adds a hosted Foundry Responses sample that discovers MCP-based skills from a Foundry Toolbox and makes them available to the agent via AgentSkillsProvider. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new .NET hosted sample (Hosted-ToolboxMcpSkills) under dotnet/samples/04-hosting/FoundryHostedAgents/responses/ showing how to connect to a Foundry Toolbox MCP endpoint, discover MCP-served Agent Skills via AgentSkillsProviderBuilder.UseMcpSkills, and expose them to a Foundry-hosted agent through AIContextProviders.
Changes:
- Introduces a new hosted agent sample that connects to a Foundry Toolbox MCP endpoint and wires discovered MCP skills into the agent via
AgentSkillsProvider. - Adds contributor and NuGet-user Docker workflows plus local
.env-based configuration and documentation. - Registers the new sample project in
dotnet/agent-framework-dotnet.slnx.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md | Documents the sample’s purpose, configuration, and run steps (local + Docker). |
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/Program.cs | Implements the hosted agent: connects to Toolbox MCP, builds an MCP-backed skills provider, hosts via Foundry Responses. |
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/HostedToolboxMcpSkills.csproj | Adds required package/project references for the sample. |
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/Dockerfile.contributor | Contributor workflow Dockerfile (copies pre-published output). |
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/Dockerfile | NuGet-consumer Dockerfile (restore/publish inside container). |
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/agent.yaml | Container agent definition for hosting (resources + env vars). |
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/agent.manifest.yaml | Agent manifest metadata + parameterization for hosting templates. |
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/.env.example | Local configuration template for running the sample. |
| dotnet/agent-framework-dotnet.slnx | Adds the new sample project to the .NET solution index. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removes the need for an explicit InnerHandler. Enables CheckCertificateRevocationList to satisfy CA5399. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rogerbarreto
approved these changes
May 29, 2026
peibekwe
approved these changes
May 29, 2026
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.
Adds a new hosted sample
Hosted-ToolboxMcpSkillsunderdotnet/samples/04-hosting/FoundryHostedAgents/responses/that demonstrates how to discover MCP-based skills from a Foundry Toolbox and make them available to a Foundry-hosted agent viaAgentSkillsProvider.Follows the conventions of the other samples in the folder.