Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backend/app/mcp_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def _register_knowledge_tools() -> None:
# The decorators will add tools to the global registry
from app.mcp_server.tool_registry import register_tools_to_server
from app.mcp_server.tools import ( # noqa: F401 side-effect: triggers @mcp_tool registration
dingtalk_upload,
knowledge,
)

Expand Down
8 changes: 6 additions & 2 deletions backend/app/mcp_server/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

Contains tools for:
- System MCP (silent_exit)
- Knowledge MCP (list_knowledge_bases, list_documents, create_knowledge_base,
create_document, update_document_content)
- Knowledge MCP (wegent_kb_search_knowledge_base, wegent_kb_list_knowledge_bases,
wegent_kb_list_documents, wegent_kb_create_knowledge_base,
wegent_kb_create_document, wegent_kb_read_document_content,
wegent_kb_update_document_content)

Knowledge MCP tools are implemented independently using the KnowledgeOrchestrator
service layer, with Celery-based async task scheduling for indexing and summary.
Expand All @@ -26,13 +28,15 @@
get_registered_mcp_tools,
mcp_tool,
)
from .dingtalk_upload import DINGTALK_UPLOAD_MCP_TOOLS
from .knowledge import KNOWLEDGE_MCP_TOOLS
from .silent_exit import silent_exit
from .subscription import create_subscription, preview_subscription

__all__ = [
"silent_exit",
"KNOWLEDGE_MCP_TOOLS",
"DINGTALK_UPLOAD_MCP_TOOLS",
"mcp_tool",
"get_registered_mcp_tools",
"build_mcp_tools_dict",
Expand Down
4 changes: 2 additions & 2 deletions backend/app/mcp_server/tools/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from app.mcp_server.tools.decorator import mcp_tool

@mcp_tool(
name="list_knowledge_bases",
name="wegent_kb_list_knowledge_bases",
description="List all accessible knowledge bases",
server="knowledge",
exclude_params=["token_info"], # Hidden from MCP schema
Expand Down Expand Up @@ -201,7 +201,7 @@ def mcp_tool(

Example:
@mcp_tool(
name="list_knowledge_bases",
name="wegent_kb_list_knowledge_bases",
description="List all accessible knowledge bases",
server="knowledge",
exclude_params=["token_info"],
Expand Down
Loading
Loading