Skip to content

Commit e36b7f0

Browse files
committed
fix: remove prefix of builtin tools
1 parent b838b53 commit e36b7f0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/ai-native/src/common/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export const extractCodeBlocks = (content: string): string => {
5151
return newContents.join('\n');
5252
};
5353

54-
export const getToolName = (toolName: string, serverName = BUILTIN_MCP_SERVER_NAME) => `mcp_${serverName}_${toolName}`;
54+
export const getToolName = (toolName: string, serverName: string) =>
55+
serverName === BUILTIN_MCP_SERVER_NAME ? toolName : `mcp_${serverName}_${toolName}`;
5556

5657
export const cleanAttachedTextWrapper = (text: string) => {
5758
const rgAttachedFile = /`<attached_file>(.*)`/g;

0 commit comments

Comments
 (0)