agent: Namespace MCP server tools (#30600)
This fixes an issue where requests were failing when MCP servers were registering tools with the same name. We now prefix the tool names with the context server name, in the UI we still show the name that the MCP server gives us Release Notes: - agent: Fix an error were requests would fail if two MCP servers were using an identical tool name
This commit is contained in:
parent
5db14d315b
commit
21bd91a773
4 changed files with 12 additions and 3 deletions
|
@ -203,6 +203,11 @@ pub trait Tool: 'static + Send + Sync {
|
|||
/// Returns the name of the tool.
|
||||
fn name(&self) -> String;
|
||||
|
||||
/// Returns the name to be displayed in the UI for this tool.
|
||||
fn ui_name(&self) -> String {
|
||||
self.name()
|
||||
}
|
||||
|
||||
/// Returns the description of the tool.
|
||||
fn description(&self) -> String;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue