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
// TreeEntryResponse represents a single entry in a Git tree.
17
+
typeTreeEntryResponsestruct {
18
+
Pathstring`json:"path"`
19
+
Typestring`json:"type"`
20
+
Size*int`json:"size,omitempty"`
21
+
Modestring`json:"mode"`
22
+
SHAstring`json:"sha"`
23
+
URLstring`json:"url"`
24
+
}
25
+
26
+
// TreeResponse represents the response structure for a Git tree.
27
+
typeTreeResponsestruct {
28
+
SHAstring`json:"sha"`
29
+
Truncatedbool`json:"truncated"`
30
+
Tree []TreeEntryResponse`json:"tree"`
31
+
TreeSHAstring`json:"tree_sha"`
32
+
Ownerstring`json:"owner"`
33
+
Repostring`json:"repo"`
34
+
Recursivebool`json:"recursive"`
35
+
Countint`json:"count"`
36
+
}
37
+
38
+
// GetRepositoryTree creates a tool to get the tree structure of a GitHub repository.
39
+
funcGetRepositoryTree(getClientGetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
40
+
returnmcp.NewTool("get_repository_tree",
41
+
mcp.WithDescription(t("TOOL_GET_REPOSITORY_TREE_DESCRIPTION", "Get the tree structure (files and directories) of a GitHub repository at a specific ref or SHA")),
Copy file name to clipboardExpand all lines: pkg/github/repositories.go
-140Lines changed: 0 additions & 140 deletions
Original file line number
Diff line number
Diff line change
@@ -677,146 +677,6 @@ func GetFileContents(getClient GetClientFn, getRawClient raw.GetRawClientFn, t t
677
677
}
678
678
}
679
679
680
-
// GetRepositoryTree creates a tool to get the tree structure of a GitHub repository.
681
-
funcGetRepositoryTree(getClientGetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
682
-
returnmcp.NewTool("get_repository_tree",
683
-
mcp.WithDescription(t("TOOL_GET_REPOSITORY_TREE_DESCRIPTION", "Get the tree structure (files and directories) of a GitHub repository at a specific ref or SHA")),
0 commit comments