You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: diagnostic logging for index_folder — skip counts and no-symbol tracking
* feat: add per-reason discovery logging and diagnostic response fields to index_folder
Adds structured skip_counts tracking to discover_local_files() covering all
filter paths (symlink, path_traversal, skip_pattern, gitignore, extra_ignore,
secret, wrong_extension, too_large, unreadable, binary). Files that pass
discovery but yield no AST symbols are now tracked separately with DEBUG
logging. Both datasets are returned in the index_folder tool response as
discovery_skip_counts, no_symbols_count, and no_symbols_files, making it
straightforward to diagnose why files are absent from the index.
Adds --log-level / --log-file CLI args to server main() (also via
JCODEMUNCH_LOG_LEVEL / JCODEMUNCH_LOG_FILE env vars). Defaults to WARNING
so normal operation is silent. Updates README and MCP tool description
to document the new flags and response fields. Fixes test_security.py
call sites to unpack the new 3-tuple return value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: trim index_folder tool description to reduce context bloat
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: surface diagnostic fields in incremental index result
Add discovery_skip_counts, no_symbols_count, and no_symbols_files to
the incremental return path in index_folder, which previously omitted
them despite being computed. Also fix test unpacking __, __ -> *_.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,6 +173,25 @@ Config file location:
173
173
}
174
174
```
175
175
176
+
**With debug logging (useful when diagnosing why files are not indexed):**
177
+
178
+
```json
179
+
{
180
+
"mcpServers": {
181
+
"jcodemunch": {
182
+
"command": "uvx",
183
+
"args": [
184
+
"jcodemunch-mcp",
185
+
"--log-level", "DEBUG",
186
+
"--log-file", "/tmp/jcodemunch.log"
187
+
]
188
+
}
189
+
}
190
+
}
191
+
```
192
+
193
+
> Logging flags can also be set via env vars `JCODEMUNCH_LOG_LEVEL` and `JCODEMUNCH_LOG_FILE`. Always use `--log-file` (or the env var) when debugging — writing logs to stderr can corrupt the MCP stdio stream in some clients.
194
+
176
195
After saving the config, **restart Claude Desktop / Claude Code** for the server to appear.
177
196
178
197
### Google Antigravity
@@ -350,6 +369,8 @@ For **LM Studio**, ensure the Local Server is running (usually on port 1234):
350
369
|`OPENAI_TIMEOUT`| Timeout in seconds for local requests (default: `60.0`) | No |
351
370
|`CODE_INDEX_PATH`| Custom cache path | No |
352
371
|`JCODEMUNCH_SHARE_SAVINGS`| Set to `0` to disable anonymous community token savings reporting | No |
description="Index a local folder containing source code. Walks directory, parses ASTs, extracts symbols, and saves to local storage. Works with any folder containing supported language files.",
60
+
description="Index a local folder containing source code. Response includes `discovery_skip_counts` (files filtered per reason), `no_symbols_count`/`no_symbols_files` (files with no extractable symbols) for diagnosing missing files.",
0 commit comments