mcp-code-indexer 1.0.5__py3-none-any.whl → 1.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,22 +165,7 @@ class MCPCodeIndexServer:
165
165
  ),
166
166
  types.Tool(
167
167
  name="find_missing_descriptions",
168
- description="Scans the project folder to find files that don't have descriptions yet. This is stage 1 of a two-stage process for updating missing descriptions.",
169
- inputSchema={
170
- "type": "object",
171
- "properties": {
172
- "projectName": {"type": "string", "description": "The name of the project"},
173
- "folderPath": {"type": "string", "description": "Absolute path to the project folder on disk"},
174
- "branch": {"type": "string", "description": "Git branch name"},
175
- "remoteOrigin": {"type": ["string", "null"], "description": "Git remote origin URL if available"},
176
- "upstreamOrigin": {"type": ["string", "null"], "description": "Upstream repository URL if this is a fork"}
177
- },
178
- "required": ["projectName", "folderPath", "branch"]
179
- }
180
- ),
181
- types.Tool(
182
- name="update_missing_descriptions",
183
- description="Batch updates descriptions for multiple files at once. This is stage 2 after find_missing_descriptions.",
168
+ description="Scans the project folder to find files that don't have descriptions yet. Use update_file_description to add descriptions for individual files.",
184
169
  inputSchema={
185
170
  "type": "object",
186
171
  "properties": {
@@ -189,20 +174,9 @@ class MCPCodeIndexServer:
189
174
  "branch": {"type": "string", "description": "Git branch name"},
190
175
  "remoteOrigin": {"type": ["string", "null"], "description": "Git remote origin URL if available"},
191
176
  "upstreamOrigin": {"type": ["string", "null"], "description": "Upstream repository URL if this is a fork"},
192
- "descriptions": {
193
- "type": "array",
194
- "description": "Array of file paths and their descriptions",
195
- "items": {
196
- "type": "object",
197
- "properties": {
198
- "filePath": {"type": "string", "description": "Relative path to the file"},
199
- "description": {"type": "string", "description": "Detailed description of the file"}
200
- },
201
- "required": ["filePath", "description"]
202
- }
203
- }
177
+ "limit": {"type": "integer", "description": "Maximum number of missing files to return (optional)"}
204
178
  },
205
- "required": ["projectName", "folderPath", "branch", "descriptions"]
179
+ "required": ["projectName", "folderPath", "branch"]
206
180
  }
207
181
  ),
208
182
  types.Tool(
@@ -276,7 +250,6 @@ class MCPCodeIndexServer:
276
250
  "update_file_description": self._handle_update_file_description,
277
251
  "check_codebase_size": self._handle_check_codebase_size,
278
252
  "find_missing_descriptions": self._handle_find_missing_descriptions,
279
- "update_missing_descriptions": self._handle_update_missing_descriptions,
280
253
  "search_descriptions": self._handle_search_descriptions,
281
254
  "get_codebase_overview": self._handle_get_codebase_overview,
282
255
  "merge_branch_descriptions": self._handle_merge_branch_descriptions,
@@ -310,8 +283,10 @@ class MCPCodeIndexServer:
310
283
  folder_path = arguments["folderPath"]
311
284
  branch = arguments.get("branch", "main")
312
285
 
313
- # Create project ID from identifiers
314
- id_source = f"{project_name}:{remote_origin}:{upstream_origin}:{folder_path}"
286
+ # Create project ID from identifiers (normalize None values for consistent hashing)
287
+ remote_key = remote_origin or ""
288
+ upstream_key = upstream_origin or ""
289
+ id_source = f"{project_name}:{remote_key}:{upstream_key}:{folder_path}"
315
290
  project_id = hashlib.sha256(id_source.encode()).hexdigest()[:16]
316
291
 
317
292
  # Check if project exists, create if not
@@ -443,45 +418,23 @@ class MCPCodeIndexServer:
443
418
  missing_files = scanner.find_missing_files(existing_paths)
444
419
  missing_paths = [scanner.get_relative_path(f) for f in missing_files]
445
420
 
421
+ # Apply limit if specified
422
+ limit = arguments.get("limit")
423
+ total_missing = len(missing_paths)
424
+ if limit is not None and isinstance(limit, int) and limit > 0:
425
+ missing_paths = missing_paths[:limit]
426
+
446
427
  # Get project stats
447
428
  stats = scanner.get_project_stats()
448
429
 
449
430
  return {
450
431
  "missingFiles": missing_paths,
451
- "totalMissing": len(missing_paths),
432
+ "totalMissing": total_missing,
433
+ "returnedCount": len(missing_paths),
452
434
  "existingDescriptions": len(existing_paths),
453
435
  "projectStats": stats
454
436
  }
455
437
 
456
- async def _handle_update_missing_descriptions(self, arguments: Dict[str, Any]) -> Dict[str, Any]:
457
- """Handle update_missing_descriptions tool calls."""
458
- project_id = await self._get_or_create_project_id(arguments)
459
- descriptions_data = arguments["descriptions"]
460
-
461
- # Create FileDescription objects
462
- file_descriptions = []
463
- for desc_data in descriptions_data:
464
- file_desc = FileDescription(
465
- project_id=project_id,
466
- branch=arguments["branch"],
467
- file_path=desc_data["filePath"],
468
- description=desc_data["description"],
469
- file_hash=None, # Hash not provided in batch operations
470
- last_modified=datetime.utcnow(),
471
- version=1
472
- )
473
- file_descriptions.append(file_desc)
474
-
475
- # Batch create descriptions
476
- await self.db_manager.batch_create_file_descriptions(file_descriptions)
477
-
478
- return {
479
- "success": True,
480
- "updatedFiles": len(file_descriptions),
481
- "files": [desc["filePath"] for desc in descriptions_data],
482
- "message": f"Successfully updated descriptions for {len(file_descriptions)} files"
483
- }
484
-
485
438
  async def _handle_search_descriptions(self, arguments: Dict[str, Any]) -> Dict[str, Any]:
486
439
  """Handle search_descriptions tool calls."""
487
440
  project_id = await self._get_or_create_project_id(arguments)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-code-indexer
3
- Version: 1.0.5
3
+ Version: 1.0.7
4
4
  Summary: MCP server that tracks file descriptions across codebases, enabling AI agents to efficiently navigate and understand code through searchable summaries and token-aware overviews.
5
5
  Author: MCP Code Indexer Contributors
6
6
  Maintainer: MCP Code Indexer Contributors
@@ -11,12 +11,12 @@ mcp_code_indexer/database/models.py,sha256=3wOxHKb6j3zKPWFSwB5g1TLpI507vLNZcqsxZ
11
11
  mcp_code_indexer/middleware/__init__.py,sha256=p-mP0pMsfiU2yajCPvokCUxUEkh_lu4XJP1LyyMW2ug,220
12
12
  mcp_code_indexer/middleware/error_middleware.py,sha256=v6jaHmPxf3qerYdb85X1tHIXLxgcbybpitKVakFLQTA,10109
13
13
  mcp_code_indexer/server/__init__.py,sha256=16xMcuriUOBlawRqWNBk6niwrvtv_JD5xvI36X1Vsmk,41
14
- mcp_code_indexer/server/mcp_server.py,sha256=Ok4nrwkRNLGmHTEeW-Ij00gVMMRtS5aX-Hi-lUot5bg,39900
14
+ mcp_code_indexer/server/mcp_server.py,sha256=UVdHlQA39wH3BjleHDjEdesZcGcxSAzTYe-4Vbe_e3o,37253
15
15
  mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4,sha256=Ijkht27pm96ZW3_3OFE-7xAPtR0YyTWXoRO8_-hlsqc,1681126
16
16
  mcp_code_indexer/tools/__init__.py,sha256=m01mxML2UdD7y5rih_XNhNSCMzQTz7WQ_T1TeOcYlnE,49
17
- mcp_code_indexer-1.0.5.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
18
- mcp_code_indexer-1.0.5.dist-info/METADATA,sha256=JnsvZ1a4k6FP_wulSZAwm6kgB3FNuNRPWaG0HMVHd4o,11930
19
- mcp_code_indexer-1.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- mcp_code_indexer-1.0.5.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
21
- mcp_code_indexer-1.0.5.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
22
- mcp_code_indexer-1.0.5.dist-info/RECORD,,
17
+ mcp_code_indexer-1.0.7.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
18
+ mcp_code_indexer-1.0.7.dist-info/METADATA,sha256=JlErebjwDPFkFJEB5Ofn2kjiqFBn37ihNgG7z5Dnge8,11930
19
+ mcp_code_indexer-1.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ mcp_code_indexer-1.0.7.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
21
+ mcp_code_indexer-1.0.7.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
22
+ mcp_code_indexer-1.0.7.dist-info/RECORD,,