pub struct ToolAlias {
pub alias: String,
pub server_id: String,
pub original_name: String,
}Expand description
Tool alias mapping for namespaced tool access.
Maps a fully-qualified tool name (with server prefix) to the original tool name on a specific server. This enables multiple servers to provide tools with the same name without conflicts.
§Format
The alias format is: mcp__<server_id>__<original_name>
§Fields
alias- Fully-qualified tool name with server prefixserver_id- Identifier of the server providing this tooloriginal_name- Original tool name on the server
§Example
ⓘ
let alias = ToolAlias {
alias: "mcp__filesystem__read_file".to_string(),
server_id: "filesystem".to_string(),
original_name: "read_file".to_string(),
};
// When the user calls "mcp__filesystem__read_file",
// it maps to the "read_file" tool on the "filesystem" serverFields§
§alias: StringFully-qualified tool name (mcp__
server_id: StringServer providing this tool
original_name: StringOriginal tool name on the server
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolAlias
impl RefUnwindSafe for ToolAlias
impl Send for ToolAlias
impl Sync for ToolAlias
impl Unpin for ToolAlias
impl UnsafeUnpin for ToolAlias
impl UnwindSafe for ToolAlias
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more