Skip to content

feat(mcp): consolidate 4 tools into search_issues (breaking) #104

Description

@liplus-lin-lay

目的

MCP tool surface を 4 → 1 に収束する。ハイブリッド検索 (BGE-M3 dense + BM25 sparse + cross-encoder reranker) を単一エントリポイントに据え、周辺 3 tool (get_doc_content / get_issue_context / list_recent_activity) は search_issues の拡張として折り畳む or 廃止する。

前提 (検証済み 2026-04-23)

src/mcp.ts literal 読み結果:

  • search_issues (L87): hybrid search core。Vectorize + D1 FTS5 + reranker。類機能なし、必須
  • get_issue_context (L567): live GitHub API (単一 issue 集約)。search とは独立の live 叩き
  • get_doc_content (L813): GitHub contents API で raw .md 取得
  • list_recent_activity (L927): IssueStore の時間窓 query

解析結果 (「search だけで成立するか」):

既存 tool search 単独で成立 取り扱い
list_recent_activity ◎ 退化ケース (空 query + time sort) 削除、search の拡張に吸収
get_doc_content ◯ inline content return で吸収可 削除、search の include_content option に吸収
get_issue_context △ live data の喪失 削除 (許容)。stale snapshot で十分な用途が大半、live は gh / webhook MCP で補填

制約

機能制約

search_issues の API 拡張:

  1. query を optional に (空 query = time-ordered scan mode)
  2. sort 追加: "relevance" (default) / "updated_desc" / "created_desc"
  3. include_content 追加: type=doc 結果の raw content を inline 返却 (default false)
  4. since / until 追加: 時間窓フィルタ (activity scan 用)
  5. 既存の type / repo / state / labels / milestone / assignee / fusion / rerank / top_k params は保持

削除対象:

  • get_doc_content tool 登録と handler
  • get_issue_context tool 登録と handler
  • list_recent_activity tool 登録と handler

Proxy 側更新

mcp-server/server/index.js の stdio 側 tool schema が Worker 側の変更に合わせて同期される必要あり:

  • 削除: get_doc_content / get_issue_context / list_recent_activity の stdio schema
  • 更新: search_issues の schema に新 params 反映

Docs 更新

  • README.md / README.ja.md の tool 一覧を 1 tool 表記に改修
  • search_issues の使い方 (空 query / include_content / since 等) を追記
  • 削除 tool の記述を全て除去

バージョン / リリース

  • minor release (v0.8.0) — tool 面の破壊的変更
  • 現行クライアント (Claude Code / Claude Desktop) は MCP 再接続で新 tool list を読み直す (通常の再起動で解決)

Target files

  • src/mcp.ts — tool 登録 4 → 1、search_issues 拡張実装
  • mcp-server/server/index.js — proxy 側 stdio schema 同期
  • README.md — tool 一覧更新
  • README.ja.md — tool 一覧更新

範囲

minor (tool surface の user/system observable な破壊的変更)

関連

Activity

  1. added this to the milestone on Apr 23, 2026
  2. added
    enhancement新機能・改善要望
    ready本文が実装開始できる形まで収束している状態。ただし更新は継続可能
    specLi+の挙動に影響する仕様・ポリシー・定義
    on Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement新機能・改善要望ready本文が実装開始できる形まで収束している状態。ただし更新は継続可能specLi+の挙動に影響する仕様・ポリシー・定義

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions