Skip to content

Commit f3e6ec2

Browse files
committed
fix: modifies tool call err msg when incorrect names are supplied
1 parent 9421371 commit f3e6ec2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/chat-cli/src/cli/chat/tool_manager.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ impl ToolManager {
853853
Err(ToolResult {
854854
tool_use_id: value.id.clone(),
855855
content: vec![ToolResultContentBlock::Text(format!(
856-
"The tool, \"{name}\" is supplied with incorrect name"
856+
"Tool call with {name} does not correspond to any existing tool."
857857
))],
858858
status: ToolResultStatus::Error,
859859
})
@@ -864,15 +864,15 @@ impl ToolManager {
864864
let (server_name, tool_name) = name.split_once(NAMESPACE_DELIMITER).ok_or(ToolResult {
865865
tool_use_id: value.id.clone(),
866866
content: vec![ToolResultContentBlock::Text(format!(
867-
"The tool, \"{name}\" is supplied with incorrect name"
867+
"Tool call with {name} does not correspond to any existing tool."
868868
))],
869869
status: ToolResultStatus::Error,
870870
})?;
871871
let Some(client) = self.clients.get(server_name) else {
872872
return Err(ToolResult {
873873
tool_use_id: value.id,
874874
content: vec![ToolResultContentBlock::Text(format!(
875-
"The tool, \"{server_name}\" is not supported by the client"
875+
"Tool call with {name} does not correspond to any existing tool."
876876
))],
877877
status: ToolResultStatus::Error,
878878
});

0 commit comments

Comments
 (0)