fix(mcp-server): expose graph_expand / graph_hops in proxy search schema#158
Merged
Conversation
Worker (src/mcp.ts) added graph_expand / graph_hops in v0.9.0, but the client proxy's static TOOLS schema was not updated. MCP clients applied additionalProperties:false against the stale schema and silently stripped the unknown params before they reached the Worker, so graph expansion never fired through `npx github-rag-mcp` (graph_expanded:false). proxy の静的 TOOLS スキーマに graph_expand / graph_hops を追加し、通常の search ツールからグラフ展開を呼べるようにする。転送経路は引数を素通しし、 Worker 側は既に受理可能なため proxy 一箇所の変更で到達性が回復する。 Refs #157
liplus-lin-lay
commented
Jun 14, 2026
liplus-lin-lay
left a comment
Member
Author
There was a problem hiding this comment.
セルフレビュー (auto モード)
- 変更範囲:
mcp-server/server/index.js1ファイル・16行追加のみ。Worker / CI / 他経路に副作用なし(node --check通過、CI green)。 - 文言整合: 追加した
graph_expand/graph_hopsの description は Workersrc/mcp.tsの.describe()と一致。graph_hopsは minimum 1 / maximum 2 で Worker の zod.min(1).max(2)と整合。 - 正当性検証: マージ前に OAuth 直叩き(スキーマ迂回)で Worker が当該 param を受理し
graph_expanded:true/ neighbors 14 を返すことを実証済み。proxy 転送callRemoteToolは引数素通しのため、スキーマ追加で到達性が回復する。 - release type = patch: 既出荷機能(v0.9.0 Worker 側 graph 実装)の client 到達性回復であり、新規挙動の追加でも user/system observable な構造変更でもない。
- brake1 非該当: 本 PR は USER_REPO(github-rag-mcp) の通常 bug fix であり Li+ source(LI_PLUS_REPO) の self-evolution PR ではないため parallel-subagent-eval は対象外。
承認可、マージへ。
This was referenced Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
v0.9.0 で Worker(
src/mcp.ts) のsearchに追加されたgraph_expand/graph_hopsを、client proxy(mcp-server/server/index.js) の静的TOOLSスキーマにも追加する。背景 / 原因
TOOLS定数を返す(setRequestHandler(ListToolsRequestSchema, () => ({tools: TOOLS})))。additionalProperties:falseを適用し未知 param を黙って除去 → Worker に届かずgraph_expanded:false。callRemoteToolは引数を Worker へ素通しするため、proxy スキーマに足すだけで届く(Worker は既に受理可能)。変更
mcp-server/server/index.jsのTOOLS.search.inputSchema.propertiesにgraph_expand(boolean) /graph_hops(number, minimum 1 / maximum 2) を追加。文言は Worker の.describe()と一致。node --check通過。検証
graph_expand=trueを受理しgraph_expanded:true/ neighbors 14 を返すことを実証済み。release
v0.9.1。Closes #157