source-context-mcp 0.1.dev7__py3-none-any.whl → 0.1.dev8__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.
@@ -27,7 +27,9 @@ call.
27
27
 
28
28
  Resolve scope before calling graph or search tools. Try get_path_settings(path) first if the user is working inside a \
29
29
  local checkout; fall back to default_workspace() if no path-specific config exists. Otherwise narrow down with \
30
- list_workspaces -> list_repositories -> list_branches -> list_projects.
30
+ list_workspaces -> list_repositories. Immediately call get_repository_overview(repository_id) to acquire the full \
31
+ architectural profile (frameworks, tech stack, subprojects, directory map, entrypoints) in one call. Use list_branches \
32
+ and list_projects only if you need a specific branch or subproject ID not already resolved.
31
33
 
32
34
  Once you have a project_id, use list_files_in_project for file_ids, then get_file_structure before get_file_content \
33
35
  when you only need an overview or a node_id - avoid reading full file contents unless necessary.
@@ -70,3 +70,39 @@ def register_tools(mcp: MCPServer) -> None:
70
70
  }
71
71
  res = await client.post("/general/projects", req_body)
72
72
  return res.result()
73
+
74
+ @mcp.tool(
75
+ description="Get a comprehensive technical overview and architecture summary of a repository in ONE single "
76
+ "call. Returns summary, primary language, frameworks, tech stack, sub-projects (e.g. backend/frontend), "
77
+ "key entrypoints, and directory structure map. "
78
+ "CRITICAL: ALWAYS call this tool FIRST when beginning to explore or analyze any repository, before "
79
+ "attempting to list files or read directories. This single call gives you the complete architectural "
80
+ "blueprint and entrypoints, drastically reducing exploratory tool calls and token consumption."
81
+ )
82
+ async def get_repository_overview(
83
+ client: ApiClientDep,
84
+ repository_id: Annotated[int, Field(description="Repository ID.", ge=1)],
85
+ workspace_id: Annotated[
86
+ int | None,
87
+ Field(
88
+ default=None,
89
+ description="Optional Workspace ID. If omitted, resolved across accessible workspaces.",
90
+ ge=1,
91
+ ),
92
+ ] = None,
93
+ include_readme: Annotated[
94
+ bool,
95
+ Field(
96
+ default=False,
97
+ description="Whether to include full raw README markdown (default False to conserve tokens).",
98
+ ),
99
+ ] = False,
100
+ ) -> Any:
101
+ req_body: dict[str, Any] = {
102
+ "repository_id": repository_id,
103
+ "include_readme": include_readme,
104
+ }
105
+ if workspace_id is not None:
106
+ req_body["workspace_id"] = workspace_id
107
+ res = await client.post("/general/repository-overview", req_body)
108
+ return res.result()
@@ -1,4 +1,4 @@
1
- from typing import Annotated, Any, Literal
1
+ from typing import Annotated, Any
2
2
 
3
3
  from mcp.server import MCPServer
4
4
  from pydantic import Field
@@ -74,3 +74,19 @@ def register_tools(mcp: MCPServer) -> None:
74
74
  ) -> Any:
75
75
  res = await client.get(f"/graph/nodes/{node_id}/callees")
76
76
  return res.result()
77
+
78
+ @mcp.tool(description="Find functions, methods and classes in a project that are not referenced anywhere.")
79
+ async def find_unused_nodes_in_project(
80
+ client: ApiClientDep,
81
+ project_id: Annotated[str, Field(description="Project ID.")],
82
+ ) -> Any:
83
+ res = await client.get(f"/graph/projects/{project_id}/unused-nodes")
84
+ return res.result()
85
+
86
+ @mcp.tool(description="Find functions, methods and classes in a file that are not referenced anywhere.")
87
+ async def find_unused_nodes_in_file(
88
+ client: ApiClientDep,
89
+ file_id: Annotated[str, Field(description="File ID.")],
90
+ ) -> Any:
91
+ res = await client.get(f"/graph/files/{file_id}/unused-nodes")
92
+ return res.result()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: source-context-mcp
3
- Version: 0.1.dev7
3
+ Version: 0.1.dev8
4
4
  Summary: Local Model Context Protocol (MCP) server for Source Context code intelligence.
5
5
  Author: Le Ngoc Tu, Dang Huu Hieu, Huynh Phat Tai
6
6
  Author-email: Le Ngoc Tu <tuleaibk@gmail.com>, Dang Huu Hieu <danghuuhieu038@gmail.com>, Huynh Phat Tai <huynhphtai@gmail.com>
@@ -13,13 +13,13 @@ source_context_mcp/prompts/prepare_for_change.py,sha256=VtNDg3_fcxB7wVKT0prfQAvz
13
13
  source_context_mcp/prompts/summarize_file.py,sha256=Kz1B2z1d0GU8erZT3MoJAUrwtznuCn0frXXn3N5C1iY,1388
14
14
  source_context_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  source_context_mcp/resources/__init__.py,sha256=L04VxdEkuJfA6DeIcrWRNUGGGizG2-FN9vDCgEkEMR8,165
16
- source_context_mcp/server.py,sha256=EXma_1nC1J6EFshKSCBPxSLZYCJK58H5F6XLyoB5Emg,4113
16
+ source_context_mcp/server.py,sha256=PgCReFTAfGHd18mRoJPi8h4du6bbUBKkx3pcV7E71pE,4370
17
17
  source_context_mcp/tools/__init__.py,sha256=S-Hc3nVG6pOhhHrWH9754KLSJbjaxB81qET6-K_47W8,559
18
- source_context_mcp/tools/base.py,sha256=uR4TInXQLd9EHbBncLgxRV4yK8E6k8j13c7dX4gO3Ak,2914
18
+ source_context_mcp/tools/base.py,sha256=kgqwUf2eh3kbudU_cXm6KysgLVQ6DJSzfoSZMbrBzLQ,4555
19
19
  source_context_mcp/tools/debug.py,sha256=Uxa65hGux-On3mTh_xIKGqsYqFLf9a-IHl4YV61_RKo,889
20
- source_context_mcp/tools/graph.py,sha256=u67pBZHQh3cbwxmFs80hZtVIZ8iYvz7bIytzxmhi-IU,2775
20
+ source_context_mcp/tools/graph.py,sha256=zBqz3MNbyqOhiScEwvLYOJtgd0ZZm8we-Xlw9ORc19c,3500
21
21
  source_context_mcp/tools/vector.py,sha256=kNWVioxXRqSfcjIWhUg5KkA9T9lp1eh3S1XTfplZnP0,1568
22
- source_context_mcp-0.1.dev7.dist-info/WHEEL,sha256=lrO5MD1WVAWzcbNy_L2BwtfPrcM3KfUFpbKYXLkJX4A,80
23
- source_context_mcp-0.1.dev7.dist-info/entry_points.txt,sha256=6GHRs5Gjv4LDEnJMY3Vc4_xny6ztzsDCyUQJh0bOoVc,63
24
- source_context_mcp-0.1.dev7.dist-info/METADATA,sha256=zzc1FT8gQFdQtp4BgN4mNNaLvSMwCNJT1Xa-6GErnTs,9703
25
- source_context_mcp-0.1.dev7.dist-info/RECORD,,
22
+ source_context_mcp-0.1.dev8.dist-info/WHEEL,sha256=y6e-a5KI2W-qDAJKfh9Xr81bin8NgUdfWgz3VSXXpe4,80
23
+ source_context_mcp-0.1.dev8.dist-info/entry_points.txt,sha256=6GHRs5Gjv4LDEnJMY3Vc4_xny6ztzsDCyUQJh0bOoVc,63
24
+ source_context_mcp-0.1.dev8.dist-info/METADATA,sha256=WeqGaJ5tJVXKkwy8gnwZJHRvl11HALCgDhGXpOlsVE4,9703
25
+ source_context_mcp-0.1.dev8.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.12.1
2
+ Generator: uv 0.12.9
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any