Skip to main content
已暴露为 MCP 工具wiki_search + wiki_read —— 在 Claude / Cursor / 任意 MCP 客户端中直接调用。详见 MCP Server 60 秒配置。
已上线   1 credit · search   免费 · read

它为 Agent 做什么

wiki_search 接收自然语言查询,返回 Quant Wiki 中最相关的条目 —— 概念、公式、因子、策略。它是 agent 的 research 入口:当 agent 在任务过程中遇到金融术语(“Black-Scholes 的假设是什么?”、“什么是配对交易?“)时,先调 wiki_search 拿到 wikiItemId,再用 wiki_read 加载完整 markdown。 混合排序融合向量 cosine similarity、tsvector 词项匹配、以及 RRF 重排 —— 简短术语和长描述查询都能命中。

Agent flow

返回值

wiki_search 返回

data
WikiItem[]
required
按相关性降序排列的 wiki 条目数组。
meta.creditsUsed
number
本次调用消耗的 credit(搜索固定 1)。
meta.remainingCredits
number
账户剩余 credit。
200 OK · wiki_search
{
  "data": [
    {
      "wikiItemId": "wiki_abc123",
      "slug": "momentum-factor",
      "title": "动量因子",
      "summary": "动量因子刻画近期赢家在 3–12 个月内继续跑赢的现象,是经典 Fama-French 因子之一,也是众多系统化股票策略的基础。",
      "tags": ["equity", "factor"],
      "scores": { "combined": 0.91, "semantic": 0.88, "lexical": 0.79 }
    }
  ],
  "meta": { "creditsUsed": 1, "remainingCredits": 99 }
}

wiki_read 返回

data
WikiItem
required
完整的 wiki 条目。
meta.creditsUsed
number
读取固定 0
meta.remainingCredits
number
账户剩余 credit。

说明

两步检索是 canonical 模式wiki_search 先用 1 credit 拿一组 ID + summary,agent 据此判断要不要加载全文;再用 wiki_read 免费加载真正需要的那 1–2 篇。默认只读 top-1,summary 模糊时再读 top-2。
长文用 wiki_readmaxLength 先做预览,避免把 agent context 烧在不必要的正文上。
超过 2,000 字符 的查询会返回 400。把 agent 上下文里的长文先做摘要再调用。
wiki_searchtopK 上限是 10,超出会被静默截断。

直接调用

// 1) 搜索
{
  "method": "tools/call",
  "params": {
    "name": "wiki_search",
    "arguments": { "query": "动量因子", "topK": 5 }
  }
}

// 2) 读 top hit
{
  "method": "tools/call",
  "params": {
    "name": "wiki_read",
    "arguments": { "wikiItemId": "wiki_abc123", "maxLength": 1500 }
  }
}

完整参数参考

wikiItemId
string
required
wiki_search 返回的 wikiItemId
max_length
number
body_markdown 的最大字符数。预览长文档时使用。

相关接口

论文搜索

同样的两步检索模式,作用在学术论文语料上。

MCP Server 接入

60 秒接入 Claude / Cursor / 任意 agent harness。