Sidemate
桌伴Sidemate Wiki

工具调用

让 AI 主动上网搜、查资料、写文档。

让 AI 自主使用工具——联网搜索、读网页、查知识库、写文档。多步任务自动完成。

说明:以下工具由 Agent 在在线模式下自主调用;离线模式为纯本地推理,不经过 Agent 工具循环(离线知识库问答的检索为内置执行,不经工具)。表中"本地执行"表示该工具的运算在本机完成、结果不经云端。

工具列表

信息检索

工具说明本地执行
---------------------
search_kb搜索本地知识库(优先使用)
search_web搜索互联网,返回网页摘要❌ 需联网
fetch_url抓取指定网页的正文内容❌ 需联网

文件操作

工具说明本地执行
---------------------
read_workspace读取工作区文件全文
read_workspace_chunk分段读取长文件(每段 3000 字)
write_workspace写入文件到工作区
append_workspace向已有文件追加内容
edit_workspace对文件做精准文本替换
delete_workspace删除工作区文件
list_workspace列出工作区所有文件
list_docs列出已完成的文档

辅助工具

工具说明本地执行
---------------------
deep_read深度阅读文档,返回结构化分析
calculator安全算术(支持 + - × ÷ % 和函数)
get_current_time返回当前日期时间 + 农历
format_convert文件格式互转(md↔docx 等)
table_ops读写 Excel 表格
set_doc_status标记文档完成,触发生成 .docx/.html
summarize_history压缩过长的对话历史

调用上限

  • 每轮对话最多 20 次工具调用
  • 联网搜索(search_web)最多 3 次
  • 知识库检索(search_kb)最多 5 次
  • 网页抓取(fetch_url)最多 5 次
  • 读取/计算类工具不计入轮次上限

权限预设

设置 → 隐私安全 中选择:

预设说明
------------
完全信任所有工具可用,联网和文件操作不需确认
谨慎模式(默认)联网需确认,文件操作需确认,私密文档隔离
纯离线禁止联网,仅本地操作,强制本地 AI 模式

安全防护

  • SSRF 防护:fetch_url 默认拒绝内网地址(localhost / 192.168.x.x / 10.x.x.x),防止 AI 访问你的内网服务
  • 工作区沙盒:文件操作限制在工作区目录内,禁止 .. 路径跳出
  • 内容截断:网页正文超过 12000 字符自动截断

---

Let AI autonomously use tools — web search, URL fetch, KB lookup, file operations. Multi-step tasks done automatically.

Note: these tools are invoked by the Agent in Online mode. Offline mode is pure local inference without the Agent tool loop (KB retrieval in offline Q&A is built-in, not a tool call). "Local" means the tool runs on your machine — results never pass through the cloud.

Tool List

Information Retrieval

ToolDescriptionLocal
----------------------------
search_kbSearch local knowledge base (preferred)
search_webSearch the internet, return summaries❌ Needs internet
fetch_urlFetch web page content from a URL❌ Needs internet

File Operations

ToolDescriptionLocal
----------------------------
read_workspaceRead workspace file (full text)
read_workspace_chunkRead long files in segments (3000 chars)
write_workspaceWrite file to workspace
append_workspaceAppend content to existing file
edit_workspacePrecise text replacement in files
delete_workspaceDelete workspace file
list_workspaceList all workspace files
list_docsList completed documents

Utility Tools

ToolDescriptionLocal
----------------------------
deep_readDeep-read document, return structured analysis
calculatorSafe arithmetic (+ - × ÷ % and functions)
get_current_timeCurrent date/time + lunar calendar
format_convertFile format conversion (md↔docx etc.)
table_opsRead/write Excel tables
set_doc_statusMark doc complete, triggers .docx/.html generation
summarize_historyCompress long conversation history

Call Limits

  • Max 20 tool calls per conversation
  • Web search (search_web): max 3
  • KB search (search_kb): max 5
  • URL fetch (fetch_url): max 5
  • Read/calculator tools don't count toward the limit

Permission Presets

Choose in Settings → Privacy & Security:

PresetDescription
---------------------
TrustedAll tools available, no confirmation needed
Cautious (default)Web access requires confirmation, private docs isolated
OfflineNo internet, local operations only, forces local AI mode

Security

  • SSRF protection: fetch_url blocks internal IPs (localhost / 192.168.x.x / 10.x.x.x) by default
  • Workspace sandbox: File ops restricted to workspace directory, no .. escapes
  • Content truncation: Web content capped at 12000 characters

---