mcp-code-indexer 1.1.2__py3-none-any.whl → 1.1.3__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.
@@ -159,7 +159,8 @@ class MCPCodeIndexServer:
159
159
  "folderPath": {"type": "string", "description": "Absolute path to the project folder on disk"},
160
160
  "branch": {"type": "string", "description": "Git branch name"},
161
161
  "remoteOrigin": {"type": ["string", "null"], "description": "Git remote origin URL if available"},
162
- "upstreamOrigin": {"type": ["string", "null"], "description": "Upstream repository URL if this is a fork"}
162
+ "upstreamOrigin": {"type": ["string", "null"], "description": "Upstream repository URL if this is a fork"},
163
+ "tokenLimit": {"type": "integer", "description": "Optional token limit override (defaults to server configuration)"}
163
164
  },
164
165
  "required": ["projectName", "folderPath", "branch"]
165
166
  }
@@ -584,16 +585,19 @@ class MCPCodeIndexServer:
584
585
  branch=resolved_branch
585
586
  )
586
587
 
588
+ # Use provided token limit or fall back to server default
589
+ token_limit = arguments.get("tokenLimit", self.token_limit)
590
+
587
591
  # Calculate total tokens
588
592
  total_tokens = self.token_counter.calculate_codebase_tokens(file_descriptions)
589
- is_large = self.token_counter.is_large_codebase(total_tokens)
590
- recommendation = self.token_counter.get_recommendation(total_tokens)
593
+ is_large = total_tokens > token_limit
594
+ recommendation = "use_search" if is_large else "use_overview"
591
595
 
592
596
  return {
593
597
  "totalTokens": total_tokens,
594
598
  "isLarge": is_large,
595
599
  "recommendation": recommendation,
596
- "tokenLimit": self.token_counter.token_limit,
600
+ "tokenLimit": token_limit,
597
601
  "totalFiles": len(file_descriptions)
598
602
  }
599
603
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-code-indexer
3
- Version: 1.1.2
3
+ Version: 1.1.3
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=pa7CIwokah5T8Wi28FlxzzgiozOjabY-u51VoevOHy0,46414
14
+ mcp_code_indexer/server/mcp_server.py,sha256=n621DmoJSjJBirXte2U-GZGj-N3HZKsL9_XNpPQ1SqM,46653
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.1.2.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
18
- mcp_code_indexer-1.1.2.dist-info/METADATA,sha256=GKi-NMcH93vJanUrHiABIojml8pQRdD2jTx4umQulMw,11930
19
- mcp_code_indexer-1.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- mcp_code_indexer-1.1.2.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
21
- mcp_code_indexer-1.1.2.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
22
- mcp_code_indexer-1.1.2.dist-info/RECORD,,
17
+ mcp_code_indexer-1.1.3.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
18
+ mcp_code_indexer-1.1.3.dist-info/METADATA,sha256=RzoPaGkOBuzg8RnzAVGG4t4msuyGO6B9nnCfAXGRGbw,11930
19
+ mcp_code_indexer-1.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ mcp_code_indexer-1.1.3.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
21
+ mcp_code_indexer-1.1.3.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
22
+ mcp_code_indexer-1.1.3.dist-info/RECORD,,