Microsoft Foundry 引入共享工具箱与工具搜索功能
From inline tools to a shared Toolbox in Microsoft Foundry
Agent 工程化落地的关键基础设施更新,解决多代理场景下的工具复用与上下文膨胀痛点,做 Agentic Workflow 的同学值得重点关注其架构设计。
A travel agent needs weather forecasts, exchange rates, and local time. When a second agent needs those same capabilities, the team can configure each integration again—or manage them in one place.
旅行代理需要天气预报、汇率和本地时间。当第二个代理也需要这些能力时,团队可以再次配置每个集成——或者在一个地方统一管理它们。
This article compares two configurations in Microsoft Foundry: one with tools attached directly to the agent, and one with the agent connected to a Toolbox. A separate field-operations demo shows how Tool Search helps an agent discover the tools it needs at runtime.
本文比较了 Microsoft Foundry 中的两种配置:一种是将工具直接附加到代理上,另一种是将代理连接到工具箱(Toolbox)。一个独立的现场操作演示展示了 Tool Search 如何帮助代理在运行时发现其所需的工具。
What changes when agents use a Toolbox?
当代理使用工具箱时,会发生什么变化?
A Toolbox in Microsoft Foundry is a centrally managed, versioned collection of tools exposed through a Model Context Protocol (MCP)-compatible endpoint. Instead of wiring up each integration separately, authorized agents connect to the Toolbox. The services behind it don’t all have to speak MCP: one Toolbox can combine an OpenAPI service, a remote MCP server, and built-in Foundry tools.
Microsoft Foundry 中的工具箱是一个集中管理、版本化的工具集合,通过兼容 Model Context Protocol (MCP) 的端点暴露。与其单独连接每个集成,授权代理只需连接到工具箱即可。其后端服务不必都支持 MCP:一个工具箱可以组合 OpenAPI 服务、远程 MCP 服务器以及内置的 Foundry 工具。
Toolboxes are managed in Foundry but aren’t tied to one language or framework. Microsoft documents integrations for Microsoft Agent Framework and LangGraph and GitHub Copilot in VS Code. A custom client can also connect if it supports the endpoint’s MCP transport, can reach the endpoint, and can authenticate.
工具箱在 Foundry 中管理,但不绑定于特定语言或框架。微软为 Microsoft Agent Framework、LangGraph 以及 VS Code 中的 GitHub Copilot 提供了集成文档。如果自定义客户端支持该端点的 MCP 传输协议、能够访问该端点并能进行身份验证,也可以连接。
The travel demo: individual tools versus one connection
旅行演示:独立工具与单一连接对比
The travel-toolbox contains OpenAPI tools for weather, geocoding, forecasts, and currency, alongside the Microsoft Learn MCP server and Code Interpreter.
travel_toolbox 包含用于天气、地理编码、预报和货币的 OpenAPI 工具,以及 Microsoft Learn MCP 服务器和代码解释器(Code Interpreter)。
In the Foundry Playground, one agent lists its tools individually. The other references a single travel_toolbox connection. The integrations still need to be configured; the difference is where. Moving them into the Toolbox means another agent can reuse them without setting them up again.
在 Foundry Playground 中,一个代理逐个列出其工具,另一个则引用单一的 travel_toolbox 连接。集成仍然需要配置;区别在于配置的位置。将它们移至工具箱意味着其他代理可以复用这些工具,而无需重新设置。
Both agents received the same request for the current temperature in Paris. In this comparison, the Toolbox-backed agent used fewer input tokens than the agent with inline tools.
两个代理都收到了查询巴黎当前温度的相同请求。在此比较中,基于工具箱的代理使用的输入标记数少于内联工具的代理。
Tool Search: find the right tool without loading every definition
Tool Search:无需加载所有定义即可找到合适的工具
Toolbox and Tool Search solve different problems. Toolbox lets agents share integrations. Tool Search is optional and changes which tool definitions the model sees up front.
Toolbox 和 Tool Search 解决不同的问题。Toolbox 允许代理共享集成。Tool Search 是可选的,它会改变模型最初看到的工具定义范围。
With Tool Search enabled, the initial tool list contains tool_search, call_tool, and any explicitly pinned tools. The model describes the capability it needs in natural language. tool_search returns matching definitions, and call_tool invokes a discovered tool by name. Clear names and descriptions help distinguish tools that do similar things.
启用 Tool Search 后,初始工具列表包含 tool_search、call_tool 以及任何显式固定的工具。模型以自然语言描述其所需的能力。tool_search 返回匹配的定义,call_tool 按名称调用发现的工具。清晰的名字和描述有助于区分功能相似的工具。
The Fibey Field Ops demo checks whether all the parts for a sample work order are in stock. The activity pane shows the agent loading a work-order preparation skill, using Tool Search to find two relevant tools, and then calling Get Work Order and Check Stock (Batch). The skill provides instructions; the OpenAPI work-order tool and the MCP inventory tool retrieve the data.
Fibey Field Ops 演示检查示例工单的所有零件是否都有库存。活动窗格显示代理正在加载工单准备技能,使用 Tool Search 查找两个相关工具,然后调用 Get Work Order 和 Check Stock (Batch)。该技能提供指令;OpenAPI 工单工具和 MCP 库存工具检索数据。
For a small Toolbox, exposing every tool directly may be simplest. As the collection grows, Tool Search can keep frequently used tools visible through pinning and let the agent discover the rest on demand. That can reduce the number of tool definitions sent to the model up front.
对于小型 Toolbox,直接暴露所有工具可能是最简单的方法。随着集合的增长,Tool Search 可以通过固定功能让常用工具保持可见,并让代理按需发现其余工具。这可以减少最初发送给模型的工具定义数量。
Before sharing a Toolbox across agents, configure downstream authentication on the relevant project connections. Test changes at the version-specific endpoint before promoting them. Agents using the stable consumer endpoint then pick up the new default without redeployment. Once agents are using it, the Toolbox Monitor dashboard can show usage and errors by version when Application Insights is connected.
在跨代理共享 Toolbox 之前,请在相关项目连接上配置下游身份验证。在提升版本之前,先在特定版本的端点上测试更改。使用稳定消费者端点的代理随后无需重新部署即可获取新的默认设置。一旦代理开始使用它,当连接 Application Insights 时,Toolbox Monitor 仪表板可以按版本显示使用情况错误。
The supported tools list also includes Web Search, Foundry IQ (Azure AI Search), File Search, agent-to-agent (A2A) integrations, Browser Automation, Fabric IQ, and Work IQ.
支持的工具列表还包括 Web Search、Foundry IQ(Azure AI Search)、File Search、代理到代理 (A2A) 集成、Browser Automation、Fabric IQ 和 Work IQ。
Start with one shared tool
从共享一个工具开始
Pick a read-only tool that two agents already need. Put it in a Toolbox, connect both agents to the stable endpoint, and confirm a successful call from each. That gives the team a baseline: two agents, one integration to maintain. Add Tool Search when the collection grows and different requests start needing different tools.
选择一个两个代理都已需要的只读工具。将其放入 Toolbox 中,将两个代理连接到稳定端点,并确认每个代理都成功调用。这为团队提供了一个基线:两个代理,只需维护一个集成。当集合增长且不同的请求开始需要不同的工具时,添加 Tool Search。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力