← 返回
开发者工具

DeepWiki Ask

通过 DeepWiki MCP 查询仓库信息。支持提问、获取结构、获取文档内容。Query a repository via DeepWiki MCP: ask questions, get structure, get documentation. 用户提供 owner/repo 时触发。
通过 DeepWiki MCP 查询仓库信息:提问、获取结构、获取文档内容。用户输入 owner/repo 时触发。
autoxj
开发者工具 clawhub v1.1.0 2 版本 100000 Key: 无需
★ 1
Stars
📥 584
下载
💾 10
安装
2
版本
#latest

概述

DeepWiki 仓库查询

通过 DeepWiki MCP 对指定仓库发起查询,支持三种操作模式:提问、获取仓库结构、获取文档内容。

触发场景

  • 用户询问某仓库的作用、结构或功能
  • 用户提供仓库名(owner/repo)并带有问题
  • 用户需要了解仓库的整体结构
  • 用户需要查看仓库的详细文档内容

参数

参数必填说明
------------------------------
repo仓库名 owner/repo
question要问的问题(提问模式)
structure获取文档结构(结构模式)
contents获取文档内容(内容模式)
topic指定文档主题(与 contents 一起使用)

执行流程

提问模式

  1. 从用户消息提取 repo(owner/repo)和 question
  2. 执行(必须加 --json):

```

python /deepwiki_ask.py -r -q "" --json

```

Windows 下中文问题若编码异常,可把问题写入 UTF-8 文件后:-q @/temp_q.txt

结构模式

  1. 从用户消息提取 repo(owner/repo)。
  2. 执行(必须加 --json):

```

python /deepwiki_ask.py -r --structure --json

```

内容模式

  1. 从用户消息提取 repo(owner/repo)和可选的 topic
  2. 执行(必须加 --json):

```

python /deepwiki_ask.py -r --contents --json

python /deepwiki_ask.py -r --contents --topic "" --json

```

  1. 解析 stdout JSON:status == "success" 则根据操作模式展示相应结果;status == "error" 则提示 message
  2. 请求可能需 30–120 秒,需等待。

输出示例

提问模式

{"status": "success", "repo": "owner/repo", "mode": "question", "question": "...", "result": "..."}

结构模式

{"status": "success", "repo": "owner/repo", "mode": "structure", "result": "..."}

内容模式

{"status": "success", "repo": "owner/repo", "mode": "contents", "result": "..."}

错误响应

{"status": "error", "repo": "owner/repo", "message": "..."}

配置

config.jsonrequest_timeout_seconds(10–600,默认 120)、request_max_retries(0–10,默认 3)。

错误处理

  • 仓库格式错误:提示 owner/repo 格式
  • 超时/网络错误:脚本重试后返回 status: "error",需要提示用户检查网络

历史版本

v1.1.0 (2026-03-14)

  • 📋 支持获取文档结构(--structure)
  • 📄 支持获取文档内容(--contents)
  • 📄 支持指定文档主题(--topic)
  • 🔄 重构为 MCP 客户端类,移除 requests 依赖,改用标准库 urllib

v1.0.0 (2026-03-10)

  • 🎉 初始版本发布
  • 📖 支持 owner/repo + question 单次问答

版本历史

共 2 个版本

  • v1.0.0
    2026-03-31 04:52 安全
  • v1.1.0 当前
    2026-03-18 23:49

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

GitCode PR comment fix

autoxj
根据 GitCode PR 检视意见修改代码,需要 GITCODE_TOKEN,用于用户修改 PR 检视意见。
★ 0 📥 360
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,793
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 920 📥 185,727