check_index_coverage: tools/list schema omits that at least one non-empty paths or scopes array is required
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
src/mcp/mcp.c:800-814 のツールスキーマと、src/mcp/mcp.c:7594-7603 の検証を確認してください。check_index_coverage の説明と入力スキーマがどのように組み立てられているかを調べ、paths または scopes が空でないことを求める実行時要件と比較してください。公開されるスキーマまたは説明が、実行時検証と同じ要件を伝えていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Version
v0.12.1 (built from source at commit 9a4da7a3; also verified unchanged on main d5e39e5a)
Platform
Linux (x64)
Install channel
Built from source
Binary variant
standard
What happened, and what did you expect?
Calling check_index_coverage with only the required project argument (e.g., {"project": "demo"}) — or with empty arrays {"project": "demo", "paths": []} — is completely valid according to the MCP tools/list schema and tool description, but handle_check_index_coverage rejects the call at runtime with isError: true:
paths or scopes is required (arrays; max 128 paths and 32 scopes)
In src/mcp/mcp.c:800-814 (main d5e39e5a), the published tool schema only marks project as required, gives paths and scopes neither description nor minItems, and the tool description does not mention that at least one non-empty paths or scopes array must be supplied:
{
"name": "check_index_coverage",
"description": "Best-effort exact-path/scope coverage and freshness, paged separately. full diagnostics adds raw detail. Clean is not proof of completeness.",
"inputSchema": {
"type": "object",
"properties": {
"project": { "type": "string" },
"paths": { "type": "array", "items": { "type": "string" }, "maxItems": 128 },
"scopes": { "type": "array", "items": { "type": "string" }, "maxItems": 32 },
"...": "..."
},
"required": ["project"]
}
}
Meanwhile handle_check_index_coverage (src/mcp/mcp.c:7594-7603) enforces (path_count == 0U && scope_count == 0U) and immediately returns an error.
Expected: The MCP tools/list description and/or inputSchema should clearly declare this precondition (for example, noting in the description that at least one non-empty paths or scopes array is required, and/or adding minItems: 1 / anyOf constraints) so MCP clients/agents do not construct schema-valid calls that fail at runtime.
Reproduction
-
Dummy repository (
/tmp/cbm-reprowith one fileapp.py):def hello() -> str: return "ok" -
Index the repository, then call
check_index_coveragewith only the schema-requiredprojectfield (via MCPtools/callor CLI):codebase-memory-mcp cli index_repository '{"repo_path":"/tmp/cbm-repro","name":"demo"}' codebase-memory-mcp cli check_index_coverage '{"project":"demo"}' -
Actual result:
isError: truepaths or scopes is required (arrays; max 128 paths and 32 scopes)(Passing
{"project":"demo","paths":["app.py"]}succeeds and returnssignal: best_effort.)Expected result: Either the
tools/listschema/description documents that at least one non-emptypathsorscopesarray is required (matchingsrc/mcp/mcp.c:7594-7603), or omitting both defaults to a valid project-level response.
Logs
No stderr errors; deterministic MCP tool error returned on stdout:
paths or scopes is required (arrays; max 128 paths and 32 scopes)
Diagnostics trajectory (memory / performance / leak issues)
N/A (MCP schema / validation mismatch, not a memory or performance issue).
Project scale (if relevant)
1 file / minimal dummy snippet
Confirmations
- I searched existing issues and this is not a duplicate.
- My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
- 主要言語
- C
- スター
- 45.8k
- フォーク
- 3.8k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 90
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DeusData/codebase-memory-mcp のほかの issue
-
parsing/quality
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DeusData/codebase-memory-mcp#3062 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug editor/integration parsing/quality windows
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DeusData/codebase-memory-mcp#3050 ·
メンテナーはふだん 1 日以内に返信
-
editor/integration parsing/quality
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DeusData/codebase-memory-mcp#2286 ·
メンテナーはふだん 1 日以内に返信
-
install writes an unsupported `args` key into the Claude Code SubagentStart hook, so it never runsオープンbug editor/integration priority/high stability/performance ux/behavior
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DeusData/codebase-memory-mcp#2239 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug priority/high ux/behavior
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DeusData/codebase-memory-mcp#2232 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
DeusData/codebase-memory-mcp の issue をすべて見る
似ている issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
awslabs/aws-c-common#1319 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 13 日以内に返信
-
DBMS_UTILITY.FORMAT_ERROR_STACK exceeds the 2000-byte limit対応中かも @coder999o が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
zephyrproject-rtos/zephyr#127560 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
area-VM-meta-mono untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信