feat: 为所有插件添加完整 MCP 定义

- ai_search: search/url/web 操作
- cmd_executor: run 操作
- tool_search: query 搜索
- network_tools: ping/website/headers/ip 操作
- task_manager: add/done/delete/list/clear 操作
- audio_player: file 播放
- frontend_tester: validate/lint/test 操作

本次更新由 mimo 自动化执行,与开发者无关。
This commit is contained in:
Xiaoli Dev committed 2026-04-25 11:16:05 +08:00
1 parent bfedee5616
commit 2af7004247
7 files changed
+169

No files matched your search

+26
View File
@@ -69,6 +69,32 @@ JSON格式示例:
{\"action\": \"use_tool\", \"tool\": \"ai_search\", \"args\": \"web 什么是人工智能\"} - 搜索网络内容"""
}
def get_mcp_definition(self):
return {
"name": "ai_search",
"description": "AI搜索工具,支持网址内容提取和网络搜索",
"inputSchema": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["search", "url", "web"],
"description": "操作类型: search(搜索), url(提取网址内容), web(网络搜索)"
},
"query": {
"type": "string",
"description": "搜索词或网址"
}
},
"required": ["operation", "query"]
}
}
def convert_mcp_args(self, arguments):
op = arguments.get("operation", "")
query = arguments.get("query", "")
return f"{op} {query}"
def handle(self, args):
"""处理AI搜索请求"""
try:
+19
View File
@@ -41,6 +41,25 @@ audio_player play - 播放音频文件
{"action": "use_tool", "tool": "audio_player", "args": "play"} - 播放音频文件
直接命令:/ciallo - 播放音频文件"""
}
def get_mcp_definition(self):
return {
"name": "audio_player",
"description": "音频播放工具",
"inputSchema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"description": "音频文件路径(可选)"
}
}
}
}
def convert_mcp_args(self, arguments):
return arguments.get("file", "")
def handle(self, args):
"""处理音频播放请求"""
try:
+27
View File
@@ -60,6 +60,33 @@ cmd_executor <操作> <参数>
{"action": "use_tool", "tool": "cmd_executor", "args": "run tasklist"} - 列出所有进程
注意:仅限Windows环境使用"""
}
def get_mcp_definition(self):
return {
"name": "cmd_executor",
"description": "CMD命令执行工具,用于执行系统命令行指令",
"inputSchema": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["run"],
"description": "操作类型,固定为 run"
},
"command": {
"type": "string",
"description": "要执行的命令(如 dir, ipconfig, ls -la)"
}
},
"required": ["operation", "command"]
}
}
def convert_mcp_args(self, arguments):
op = arguments.get("operation", "run")
cmd = arguments.get("command", "")
return f"{op} {cmd}"
def handle(self, args):
"""处理CMD命令执行请求"""
try:
+26
View File
@@ -56,6 +56,32 @@ JSON格式示例:
"usage": self.usage
}
def get_mcp_definition(self):
return {
"name": "frontend_tester",
"description": "前端测试验证工具,支持HTML/CSS/JS自动化测试",
"inputSchema": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["validate", "lint", "test"],
"description": "操作类型"
},
"target": {
"type": "string",
"description": "目标文件路径"
}
},
"required": ["operation", "target"]
}
}
def convert_mcp_args(self, arguments):
op = arguments.get("operation", "")
target = arguments.get("target", "")
return f"{op} {target}"
def handle(self, args):
"""处理前端测试请求"""
try:
+26
View File
@@ -79,6 +79,32 @@ JSON格式示例:
{"action": "use_tool", "tool": "network_tools", "args": "ip www.example.com"} - 获取网站IP地址"""
}
def get_mcp_definition(self):
return {
"name": "network_tools",
"description": "网络工具,用于测试连通性、获取网页内容、解析IP等",
"inputSchema": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["ping", "website", "headers", "ip"],
"description": "操作类型"
},
"target": {
"type": "string",
"description": "目标网址或IP"
}
},
"required": ["operation", "target"]
}
}
def convert_mcp_args(self, arguments):
op = arguments.get("operation", "")
target = arguments.get("target", "")
return f"{op} {target}"
def handle(self, args):
"""处理网络工具请求"""
try:
+26
View File
@@ -77,6 +77,32 @@ JSON格式示例:
return f"保存任务失败: {e}"
return None
def get_mcp_definition(self):
return {
"name": "task_manager",
"description": "任务管理工具,支持添加、完成、删除任务",
"inputSchema": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["add", "done", "delete", "list", "clear"],
"description": "操作类型"
},
"task": {
"type": "string",
"description": "任务内容(add/done/delete 时使用)"
}
},
"required": ["operation"]
}
}
def convert_mcp_args(self, arguments):
op = arguments.get("operation", "")
task = arguments.get("task", "")
return f"{op} {task}".strip()
def handle(self, args):
"""处理任务管理请求"""
try:
+19
View File
@@ -42,6 +42,25 @@ JSON格式示例:
- 帮助 AI 快速找到合适的工具而不需要预加载所有工具"""
}
def get_mcp_definition(self):
return {
"name": "tool_search",
"description": "工具搜索插件,搜索可用工具的用法和信息",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "搜索关键词或工具名"
}
},
"required": ["query"]
}
}
def convert_mcp_args(self, arguments):
return arguments.get("query", "")
def handle(self, args):
"""处理工具搜索请求"""
try: