智谱工具 Coding Plan (Zhipu Tools)
基于 Z.AI Coding Plan MCP 端点 的免费工具集:网络搜索、网页读取、GitHub 仓库文档搜索和文件解析。
功能
| 功能 | MCP 工具 | 端点 | 说明 |
|---|
| 网络搜索 | INLINECODE0 | INLINECODE1 | 实时互联网搜索,支持过滤 |
| 网页读取 |
webReader |
/web_reader/mcp | 抓取网页标题、正文、元数据 |
|
仓库文档搜索 |
search_doc |
/zread/mcp | 搜索 GitHub 仓库文档 |
|
仓库目录结构 |
get_repo_structure |
/zread/mcp | 查看 GitHub 仓库目录树 |
|
仓库文件读取 |
read_file |
/zread/mcp | 读取 GitHub 仓库指定文件 |
|
文件解析 | — | Legacy API | 解析 PDF/Word/Excel/PPT 等 |
前五项通过 Coding Plan MCP 端点免费调用,文件解析仅支持旧版 API。
配置
在 openclaw.json 中配置 API Key:
CODEBLOCK0
或设置环境变量: INLINECODE11
MCP vs Legacy 模式
| 模式 | 端点 | 额度 | 切换方式 |
|---|
| MCP (默认) | INLINECODE12 | Z.AI Coding Plan 免费 | 默认启用 |
| Legacy |
open.bigmodel.cn/api/paas/v4/... | 账户余额 |
ZHIPU_USE_MCP=false |
MCP 模式自动 fallback:MCP 失败时会自动尝试 Legacy API。
使用方式
网络搜索 (websearchprime)
CODEBLOCK1
网页读取 (webReader)
CODEBLOCK2
GitHub 仓库文档搜索 (Zread)
CODEBLOCK3
文件解析 (Legacy only)
CODEBLOCK4
MCP 工具参数详情
websearchprime
| 参数 | 类型 | 必填 | 说明 |
|---|
| searchquery | string | 是 | 搜索内容,建议不超过 70 字符 |
| searchrecency_filter |
string | 否 | oneDay, oneWeek, oneMonth, oneYear, noLimit |
| content_size | string | 否 | medium (默认), high |
| location | string | 否 | cn, us |
| search
domainfilter | string | 否 | 限制搜索域名 |
webReader
| 参数 | 类型 | 必填 | 说明 |
|---|
| url | string | 是 | 目标网页 URL |
返回:标题、正文内容、元数据、链接列表。
search_doc
| 参数 | 类型 | 必填 | 说明 |
|---|
| repo | string | 是 | GitHub 仓库,如 "openai/openai" |
| query |
string | 是 | 搜索关键词 |
getrepostructure
| 参数 | 类型 | 必填 | 说明 |
|---|
| repo | string | 是 | GitHub 仓库 |
| path |
string | 否 | 子目录路径 |
read_file
| 参数 | 类型 | 必填 | 说明 |
|---|
| repo | string | 是 | GitHub 仓库 |
| path |
string | 是 | 文件路径,如 "README.md" |
MCP 协议
所有远程 MCP 端点通过 streamableHttp 协议交互:
- 1. POST initialize → 响应 header 返回 INLINECODE15
- POST notifications/initialized → 通知就绪
- POST tools/call → 调用具体工具
Headers: Authorization: Bearer $API_KEY, Content-Type: application/json, INLINECODE18
Coding Plan 套餐额度
| 套餐 | 搜索/网页读取/仓库搜索 次数/月 | 价格 |
|---|
| Lite | 100 次 | 免费 |
| Pro |
1,000 次 | 免费 |
|
Max | 4,000 次 | 免费 |
额度次月自动重置。
注意事项
- - API Key 敏感信息,不要提交到 Git
- Zread(仓库文档搜索)仅支持 MCP 模式
- 文件解析仅支持旧版 API(bigmodel 端点)
- 所有 MCP 工具通过 Coding Plan 免费额度调用
智谱工具 Coding Plan (Zhipu Tools)
基于 Z.AI Coding Plan MCP 端点 的免费工具集:网络搜索、网页读取、GitHub 仓库文档搜索和文件解析。
功能
| 功能 | MCP 工具 | 端点 | 说明 |
|---|
| 网络搜索 | websearchprime | /websearchprime/mcp | 实时互联网搜索,支持过滤 |
| 网页读取 |
webReader | /web_reader/mcp | 抓取网页标题、正文、元数据 |
|
仓库文档搜索 | search_doc | /zread/mcp | 搜索 GitHub 仓库文档 |
|
仓库目录结构 | get
repostructure | /zread/mcp | 查看 GitHub 仓库目录树 |
|
仓库文件读取 | read_file | /zread/mcp | 读取 GitHub 仓库指定文件 |
|
文件解析 | — | Legacy API | 解析 PDF/Word/Excel/PPT 等 |
前五项通过 Coding Plan MCP 端点免费调用,文件解析仅支持旧版 API。
配置
在 openclaw.json 中配置 API Key:
json
{
skills: {
entries: {
zhipu-tools: {
apiKey: YOURZHIPUAPI_KEY
}
}
}
}
或设置环境变量:ZHIPUAPIKEY
MCP vs Legacy 模式
| 模式 | 端点 | 额度 | 切换方式 |
|---|
| MCP (默认) | api.z.ai/api/mcp/... | Z.AI Coding Plan 免费 | 默认启用 |
| Legacy |
open.bigmodel.cn/api/paas/v4/... | 账户余额 | ZHIPU
USEMCP=false |
MCP 模式自动 fallback:MCP 失败时会自动尝试 Legacy API。
使用方式
网络搜索 (websearchprime)
bash
cd ~/.openclaw/workspace/skills/zhipu-tools
Shell
./scripts/web_search.sh 搜索关键词 [count]
Python(支持更多参数)
python3 scripts/zhipu
tool.py websearch 搜索关键词 \
--count 10 --recency week --domain example.com
网页读取 (webReader)
bash
Shell
./scripts/web_reader.sh https://www.example.com
Python
python3 scripts/zhipu
tool.py webreader https://www.example.com
GitHub 仓库文档搜索 (Zread)
bash
Shell - 搜索仓库文档
./scripts/zread.sh search openai/openai how to use
Shell - 查看目录结构
./scripts/zread.sh structure openai/openai
./scripts/zread.sh structure openai/openai src/
Shell - 读取文件
./scripts/zread.sh read openai/openai README.md
Python
python3 scripts/zhipu_tool.py zread search openai/openai how to use
python3 scripts/zhipu_tool.py zread structure openai/openai --path src/
python3 scripts/zhipu_tool.py zread read openai/openai README.md
文件解析 (Legacy only)
bash
./scripts/file_parser.sh /path/to/document.pdf PDF
python3 scripts/zhiputool.py fileparser /path/to/document.docx --file-type DOCX
MCP 工具参数详情
websearchprime
| 参数 | 类型 | 必填 | 说明 |
|---|
| searchquery | string | 是 | 搜索内容,建议不超过 70 字符 |
| searchrecency_filter |
string | 否 | oneDay, oneWeek, oneMonth, oneYear, noLimit |
| content_size | string | 否 | medium (默认), high |
| location | string | 否 | cn, us |
| search
domainfilter | string | 否 | 限制搜索域名 |
webReader
| 参数 | 类型 | 必填 | 说明 |
|---|
| url | string | 是 | 目标网页 URL |
返回:标题、正文内容、元数据、链接列表。
search_doc
| 参数 | 类型 | 必填 | 说明 |
|---|
| repo | string | 是 | GitHub 仓库,如 openai/openai |
| query |
string | 是 | 搜索关键词 |
getrepostructure
| 参数 | 类型 | 必填 | 说明 |
|---|
| repo | string | 是 | GitHub 仓库 |
| path |
string | 否 | 子目录路径 |
read_file
| 参数 | 类型 | 必填 | 说明 |
|---|
| repo | string | 是 | GitHub 仓库 |
| path |
string | 是 | 文件路径,如 README.md |
MCP 协议
所有远程 MCP 端点通过 streamableHttp 协议交互:
- 1. POST initialize → 响应 header 返回 mcp-session-id
- POST notifications/initialized → 通知就绪
- POST tools/call → 调用具体工具
Headers: Authorization: Bearer $API_KEY, Content-Type: application/json, Accept: text/event-stream, application/json
Coding Plan 套餐额度
| 套餐 | 搜索/网页读取/仓库搜索 次数/月 | 价格 |
|---|
| Lite | 100 次 | 免费 |
| Pro |
1,000 次 | 免费 |
|
Max | 4,000 次 | 免费 |
额度次月自动重置。
注意事项
- - API Key 敏感信息,不要提交到 Git
- Zread(仓库文档搜索)仅支持 MCP 模式
- 文件解析仅支持旧版 API(bigmodel 端点)
- 所有 MCP 工具通过 Coding Plan 免费额度调用