mcp server tool alias (#4621)

This commit is contained in:
heheer
2025-04-22 15:25:11 +08:00
committed by GitHub
parent 6c61812e7a
commit 2dd5cf6d1f
8 changed files with 31 additions and 4 deletions

View File

@@ -184,7 +184,7 @@ async function handler(
const app = appList.find((app) => {
const mcpApp = mcp.apps.find((mcpApp) => String(mcpApp.appId) === String(app._id))!;
return toolName === mcpApp.toolName;
return toolName === mcpApp.toolAlias || toolName === mcpApp.toolName;
});
if (!app) {

View File

@@ -138,7 +138,7 @@ async function handler(
);
return {
name: mcpApp.toolName,
name: mcpApp.toolAlias || mcpApp.toolName,
description: mcpApp.description,
inputSchema: isPlugin
? pluginNodes2InputSchema(version.nodes)