@@ -23,7 +23,7 @@ MCP (Model Context Protocol) 是一种让LLM与外部工具和服务交互的协
2323 ▼ ▼
2424┌─────────┐ ┌─────────────────┐
2525│ 内置工具 │ │ 外部MCP服务器 │
26- │ (24 +) │ │ (可动态添加) │
26+ │ (30 +) │ │ (可动态添加) │
2727└─────────┘ └─────────────────┘
2828```
2929
@@ -37,9 +37,8 @@ TelegramSearchBot 内置了以下工具,通过 `BuiltInToolAttribute` 标记
3737| ---------| ------| ------|
3838| ` ReadFile ` | 读取文件内容,支持指定行范围 | ` path ` , ` start_line? ` , ` end_line? ` |
3939| ` WriteFile ` | 写入内容到文件,文件不存在则创建 | ` path ` , ` content ` |
40- | ` EditFile ` | 编辑文件,替换指定文本 | ` path ` , ` old_text ` , ` new_text ` |
41- | ` SearchText ` | 使用正则表达式搜索文件 | ` path ` , ` pattern ` , ` file_pattern? ` |
42- | ` ListFiles ` | 列出目录下的文件和子目录 | ` path ` , ` pattern? ` |
40+ | ` SearchText ` | 使用正则表达式搜索文件 | ` pattern ` , ` path? ` , ` file_glob? ` , ` ignore_case? ` |
41+ | ` ListFiles ` | 列出目录下的文件和子目录 | ` path? ` , ` pattern? ` |
4342
4443### 2.2 Telegram 发送工具
4544
@@ -49,6 +48,7 @@ TelegramSearchBot 内置了以下工具,通过 `BuiltInToolAttribute` 标记
4948| ` send_photo_file ` | 发送图片(使用文件路径) | ` file_path ` , ` caption? ` , ` reply_to_message_id? ` |
5049| ` send_video_file ` | 发送视频(使用文件路径) | ` file_path ` , ` caption? ` , ` reply_to_message_id? ` |
5150| ` send_document_file ` | 发送文件(使用文件路径) | ` file_path ` , ` caption? ` , ` reply_to_message_id? ` |
51+ | ` send_message ` | 发送文本消息 | ` chat_id ` , ` text ` |
5252
5353** 文件大小限制** :
5454- 本地 Bot API(内置或外部): 最大 2GB
@@ -58,36 +58,43 @@ TelegramSearchBot 内置了以下工具,通过 `BuiltInToolAttribute` 标记
5858
5959| 工具名称 | 描述 | 参数 |
6060| ---------| ------| ------|
61- | ` search_messages ` | 在当前聊天的索引消息中搜索关键词 | ` query ` , ` chat_id ?` , ` limit? ` , ` offset ?` |
62- | ` query_messages ` | 在消息历史数据库中查询,支持多种过滤条件 | ` chat_id ?` , ` sender_id ?` , ` keyword ?` , ` start_date? ` , ` end_date? ` , ` limit ?` , ` offset ?` |
61+ | ` search_messages ` | 在当前聊天的索引消息中搜索关键词 | ` query ` , ` page ?` , ` page_size ?` |
62+ | ` query_messages ` | 在消息历史数据库中查询,支持多种过滤条件 | ` query_text ?` , ` sender_user_id ?` , ` sender_name_hint ?` , ` start_date? ` , ` end_date? ` , ` page ?` , ` page_size ?` |
6363
6464### 2.4 短链接工具
6565
6666| 工具名称 | 描述 | 参数 |
6767| ---------| ------| ------|
6868| ` expand_short_url ` | 获取短链接的完整URL | ` short_url ` |
69- | ` list_short_urls ` | 列出所有短链接映射 | ` filter ?` , ` limit ?` , ` offset ?` |
69+ | ` list_short_urls ` | 列出所有短链接映射 | ` original_url_query ?` , ` expanded_url_query ?` , ` page? ` , ` page_size ?` |
7070| ` expand_short_urls_batch ` | 批量获取短链接的完整URL | ` short_urls ` |
7171
7272### 2.5 MCP 服务器管理工具(仅管理员)
7373
7474| 工具名称 | 描述 | 参数 |
7575| ---------| ------| ------|
7676| ` ListMcpServers ` | 列出所有已配置的MCP服务器 | - |
77- | ` AddMcpServer ` | 添加新的MCP服务器 | ` name ` , ` command ` , ` args? ` , ` env? ` |
77+ | ` AddMcpServer ` | 添加新的MCP服务器 | ` name ` , ` command ` , ` args ` , ` env? ` |
7878| ` RemoveMcpServer ` | 移除指定的MCP服务器 | ` name ` |
79- | ` UpdateMcpServer ` | 更新MCP服务器配置 | ` name ` , ` command ?` , ` args ?` , ` env? ` |
79+ | ` UpdateMcpServer ` | 更新MCP服务器配置 | ` name ` , ` timeout ?` , ` enabled ?` , ` env? ` , ` command? ` , ` args ?` |
8080| ` RestartMcpServers ` | 重启所有MCP服务器 | - |
8181
8282### 2.6 其他工具
8383
8484| 工具名称 | 描述 | 参数 |
8585| ---------| ------| ------|
86- | ` memory_search ` | 在记忆图谱中搜索 | ` query ` |
87- | ` brave_web_search ` | 使用 Brave Search API 进行网页搜索 | ` query ` , ` count? ` |
86+ | ` process_memory_command ` | 在记忆图谱中执行操作 | ` command ` , ` arguments ` |
87+ | ` search_web ` | 使用 Brave Search API 进行网页搜索 | ` query ` , ` page? ` , ` count? ` , ` country? ` , ` search_lang ?` |
8888| ` extract_article ` | 使用 Puppeteer 提取网页文章内容 | ` url ` |
89- | ` sequential_thinking ` | 动态问题解决思考工具 | ` thought ` , ` next_thought_needed? ` |
90- | ` bash ` | 执行 Shell 命令 | ` command ` , ` timeout? ` |
89+ | ` sequential_thinking ` | 动态问题解决思考工具 | ` input ` , ` next_thought_needed? ` , ` thought_number? ` , ` total_thoughts? ` , ... |
90+ | ` bash ` | 执行 Shell 命令 | ` command ` , ` working_directory? ` , ` timeout_ms? ` |
91+ | ` execute_js ` | 使用 Deno 执行 JavaScript 代码 | ` js_code ` , ` timeout_ms? ` |
92+ | ` echo ` | 回显文本(测试用) | ` text ` |
93+ | ` calculator ` | 计算算术表达式 | ` expression ` |
94+ | ` create_todo_item ` | 创建待办事项 | ` title ` , ` list_name? ` , ` description? ` , ` priority? ` , ` due_at? ` , ` remind_at? ` |
95+ | ` query_todo_items ` | 查询待办事项 | ` list_name? ` , ` status? ` , ` page? ` , ` page_size? ` |
96+ | ` update_todo_item ` | 更新待办事项 | ` todo_id ` , ` title? ` , ` list_name? ` , ` description? ` , ` priority? ` , ... |
97+ | ` complete_todo_item ` | 标记待办事项完成 | ` todo_id ` |
9198
9299## 三、外部 MCP 服务器
93100
0 commit comments