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
@@ -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;