An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Support Model Context Protocol (MCP) https://github.com/siyuan-note/siyuan/issues/13795
Daniel77fd235f69d8
diff --git a/kernel/mcp/tools/notebook.go b/kernel/mcp/tools/notebook.goindex 48ed7a186b..33709c3712 100644--- a/kernel/mcp/tools/notebook.go+++ b/kernel/mcp/tools/notebook.go@@ -92,6 +92,12 @@ func notebookCreate(args map[string]interface{}) (CallToolResult, error) {return CallToolResult{Content: []ContentItem{{Type: "text", Text: "create notebook failed: " + err.Error()}}, IsError: true}, nil}+ if box := model.Conf.Box(id); nil != box {+ evt := util.NewCmdResult("createnotebook", 0, util.PushModeBroadcast)+ evt.Data = map[string]any{"box": box}+ util.PushEvent(evt)+ }+return CallToolResult{Content: []ContentItem{{Type: "text", Text: "notebook created: " + name + " (id: " + id + ")"}}}, nil}@@ -106,6 +112,10 @@ func notebookRename(args map[string]interface{}) (CallToolResult, error) {return CallToolResult{Content: []ContentItem{{Type: "text", Text: "rename notebook failed: " + err.Error()}}, IsError: true}, nil}+ evt := util.NewCmdResult("renamenotebook", 0, util.PushModeBroadcast)+ evt.Data = map[string]any{"box": id}+ util.PushEvent(evt)+return CallToolResult{Content: []ContentItem{{Type: "text", Text: "notebook renamed: " + id + " -> " + name}}}, nil}@@ -119,6 +129,10 @@ func notebookRemove(args map[string]interface{}) (CallToolResult, error) {return CallToolResult{Content: []ContentItem{{Type: "text", Text: "remove notebook failed: " + err.Error()}}, IsError: true}, nil}+ evt := util.NewCmdResult("removeBox", 0, util.PushModeBroadcast)+ evt.Data = map[string]any{"box": id}+ util.PushEvent(evt)+return CallToolResult{Content: []ContentItem{{Type: "text", Text: "notebook removed: " + id}}}, nil}