Skip to content

.NET: Enable tool search in the Foundry Toolbox sample - #9008

Draft
Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
microsoft:mainfrom
1aifanatic:contrib/7489-foundry-tool-search
Draft

Naveen Chatlapalli (1aifanatic) wants to merge 2 commits into
microsoft:mainfrom
1aifanatic:contrib/7489-foundry-tool-search

Conversation

@1aifanatic

@1aifanatic Naveen Chatlapalli (1aifanatic) commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Motivation & Context

The .NET Foundry Toolbox sample needs to demonstrate discovering relevant tools on demand through toolbox tool search.

Description & Review Guide

  • What are the major changes? Enable ToolSearchToolboxTool alongside MCP, connect to the exact created version, preserve existing versions, and document discovery and cleanup.
  • What is the impact of these changes? The existing MCP integration exposes tool_search and call_tool without a new framework API or dependency.
  • What do you want reviewers to focus on? The .NET sample previously built with zero warnings/errors, and its files are unchanged by this split. Review the version-pinned endpoint and toolbox search flow. Live Foundry provisioning/model execution was not run.

Related Issue

Addresses the .NET portion of #7489. The Python implementation is tracked separately in #9113, following the maintainer's request to keep each PR to one language.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 05:18
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python .NET Usage: [Issues, PRs], Target: .Net labels Oct 3, 2026
@github-actions github-actions Bot changed the title Enable tool search in Foundry Toolbox samples Python: Enable tool search in Foundry Toolbox samples Oct 3, 2026
@github-actions github-actions Bot changed the title Python: Enable tool search in Foundry Toolbox samples .NET: Enable tool search in Foundry Toolbox samples Oct 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No blocking regression was identified in these sample-only changes, though live Foundry execution remains unverified.

Review effort: Balanced
Findings: None

What changed in this PR

Adds Foundry toolbox tool-search demonstrations to the existing .NET and Python MCP samples, addressing #7489 without new framework APIs or dependencies.

Changes:

  • Enable tool search and connect to the exact created toolbox version.
  • Preserve existing versions instead of deleting toolboxes.
  • Document discovery, invocation, and version cleanup.
File Description
python/​samples/​02-agents/​providers/​foundry/​README.md Updates the toolbox sample description.
python/​samples/​02-agents/​providers/​foundry/​foundry_chat_client_with_toolbox.py Enables search using current SDK models and a version-pinned endpoint.
dotnet/​samples/​02-agents/​AgentProviders/​foundry/​Agent_Step25_FoundryToolboxMcp/​README.md Explains search behavior, endpoint versioning, and cleanup.
dotnet/​samples/​02-agents/​AgentProviders/​foundry/​Agent_Step25_FoundryToolboxMcp/​Program.cs Enables search, pins the endpoint, and preserves existing versions.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@eavanvalkenburg

Copy link
Copy Markdown
Member

Naveen Chatlapalli (@1aifanatic) Thanks for the contribution. This PR currently mixes .NET and Python changes. Please either update this PR so it contains only one language and handle the other language separately if still desired, or close this PR and open separate .NET and Python PRs.

@1aifanatic Naveen Chatlapalli (1aifanatic) changed the title .NET: Enable tool search in Foundry Toolbox samples .NET: Enable tool search in the Foundry Toolbox sample Oct 6, 2026
@1aifanatic

Copy link
Copy Markdown
Contributor Author

Updated in 6b986c1: this PR now contains only the .NET Toolbox sample and its README. The Python sample is in #9113. Both descriptions link the counterpart, and I verified the changed-file list contains only dotnet paths. The Python companion passes Ruff, Pyright, and mocked SDK provisioning checks; the .NET sample is unchanged from its successful build.

This branch was successfully deployed

1 active and 1 inactive deployments
github-app-auth — 6b986c10 Deployed Oct 6, 2026 by 1aifanatic via add_label #24530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants