feat: add auto-injection flag for tools and filter auto-injected tools in UI
This commit is contained in:
@@ -174,6 +174,9 @@ func buildAIAgentResponse(item *models.AIAgent) response.AIAgentResponse {
|
||||
if toolCode == "" {
|
||||
toolCode = toolx.BuildMCPToolCode(tool.ServerCode, tool.ToolName)
|
||||
}
|
||||
if toolx.IsAutoInjectedToolCode(toolCode) {
|
||||
continue
|
||||
}
|
||||
serverCode := strings.TrimSpace(tool.ServerCode)
|
||||
toolName := strings.TrimSpace(tool.ToolName)
|
||||
if toolCode == toolx.BuiltinToolSearchToolCode {
|
||||
|
||||
@@ -39,6 +39,7 @@ func (c *MCPController) AnyCatalog() *web.JsonResult {
|
||||
ServerCode: item.ServerCode,
|
||||
ToolName: item.ToolName,
|
||||
SourceType: item.SourceType,
|
||||
AutoInjected: item.AutoInjected,
|
||||
Title: item.Title,
|
||||
Description: item.Description,
|
||||
InputSchema: item.InputSchema,
|
||||
|
||||
Reference in New Issue
Block a user