From e3ee204ae17778b15046b1a56ab0d9e7d7ec6946 Mon Sep 17 00:00:00 2001 From: Claude Lin & Lay Date: Sun, 14 Jun 2026 15:44:52 +0900 Subject: [PATCH] fix(mcp-server): expose graph_expand / graph_hops in proxy search schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- mcp-server/server/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mcp-server/server/index.js b/mcp-server/server/index.js index 654cb2a..6afe41e 100644 --- a/mcp-server/server/index.js +++ b/mcp-server/server/index.js @@ -522,6 +522,22 @@ const TOOLS = [ "GitHub contents API) on that row. Capped at the first few doc rows to bound API fan-out. " + "Non-doc rows are unaffected. Default: false.", }, + graph_expand: { + type: "boolean", + description: + "Opt-in GraphRAG expansion (search mode only). When true, after fusion the top " + + "results seed a traversal of the Decision-Structure mention graph (D1 doc_edges); " + + "related wiki pages are appended as extra results marked with graph_hop / graph_from. " + + "Default false = byte-identical to standard hybrid retrieval (no graph read).", + }, + graph_hops: { + type: "number", + minimum: 1, + maximum: 2, + description: + "Graph traversal depth for graph_expand (1 or 2). Default 1. " + + "Ignored when graph_expand is false.", + }, }, }, annotations: {