Skip to content

Commit 8a63d0c

Browse files
committed
refactor: Update function names to use consistent capitalization and document token permissions
1 parent 0ef1113 commit 8a63d0c

2 files changed

Lines changed: 40 additions & 40 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,35 @@ automation and interaction capabilities for developers and tools.
1919
The MCP server requires specific permissions for different tools. Here are the required permissions for each tool:
2020

2121
### User Tools
22-
- **get_me** - Get details of the authenticated user
22+
- **GetMe** - Get details of the authenticated user
2323
- Required permissions: `read:user`
2424

2525
### Issues Tools
26-
- **get_issue**, **get_issue_comments**, **list_issues** - Read issue data
26+
- **GetIssue**, **GetIssueComments**, **ListIssues** - Read issue data
2727
- Required permissions: `repo` (for private repos) or no permissions (for public repos)
2828

29-
- **create_issue**, **add_issue_comment**, **update_issue** - Create/modify issues
29+
- **CreateIssue**, **AddIssueComment**, **UpdateIssue** - Create/modify issues
3030
- Required permissions: `repo` (for private repos) or `public_repo` (for public repos)
3131

3232
### Pull Request Tools
33-
- **get_pull_request**, **list_pull_requests**, **get_pull_request_files**, **get_pull_request_status**, **get_pull_request_comments**, **get_pull_request_reviews** - Read PR data
33+
- **GetPullRequest**, **ListPullRequests**, **GetPullRequestFiles**, **GetPullRequestStatus**, **GetPullRequestComments**, **GetPullRequestReviews** - Read PR data
3434
- Required permissions: `repo` (for private repos) or no permissions (for public repos)
3535

36-
- **merge_pull_request**, **update_pull_request_branch**, **create_pull_request_review**, **create_pull_request** - Create/modify PRs
36+
- **MergePullRequest**, **UpdatePullRequestBranch**, **CreatePullRequestReview**, **CreatePullRequest** - Create/modify PRs
3737
- Required permissions: `repo` (for private repos) or `public_repo` (for public repos)
3838

3939
### Repository Tools
40-
- **search_repositories** - Search repositories
40+
- **SearchRepositories** - Search repositories
4141
- Required permissions: No permissions required for public repos, `repo` for private repos
4242

43-
- **get_file_contents**, **list_commits**, **list_branches** - Read repository data
43+
- **GetFileContents**, **ListCommits**, **ListBranches** - Read repository data
4444
- Required permissions: `repo` (for private repos) or no permissions (for public repos)
4545

46-
- **create_or_update_file**, **push_files**, **create_repository** - Create/modify repository content
46+
- **CreateOrUpdateFile**, **PushFiles**, **CreateRepository**, **CreateBranch** - Create/modify repository content
4747
- Required permissions: `repo` (for private repos) or `public_repo` (for public repos)
4848

4949
### Search Tools
50-
- **search_issues** - Search issues and pull requests
50+
- **SearchIssues**, **SearchCode**, **SearchUsers** - Search GitHub data
5151
- Required permissions: No permissions required for public data, `repo` for private data
5252

5353
## Installation

pkg/github/server.go

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,53 +31,53 @@ func NewServer(client *github.Client, version string, readOnly bool, t translati
3131
s.AddResourceTemplate(getRepositoryResourcePrContent(client, t))
3232

3333
// Add GitHub tools - Issues
34-
s.AddTool(getIssue(client, t))
35-
s.AddTool(searchIssues(client, t))
36-
s.AddTool(listIssues(client, t))
37-
s.AddTool(getIssueComments(client, t))
34+
s.AddTool(GetIssue(client, t))
35+
s.AddTool(SearchIssues(client, t))
36+
s.AddTool(ListIssues(client, t))
37+
s.AddTool(GetIssueComments(client, t))
3838
if !readOnly {
39-
s.AddTool(createIssue(client, t))
40-
s.AddTool(addIssueComment(client, t))
41-
s.AddTool(updateIssue(client, t))
39+
s.AddTool(CreateIssue(client, t))
40+
s.AddTool(AddIssueComment(client, t))
41+
s.AddTool(UpdateIssue(client, t))
4242
}
4343

4444
// Add GitHub tools - Pull Requests
45-
s.AddTool(getPullRequest(client, t))
46-
s.AddTool(listPullRequests(client, t))
47-
s.AddTool(getPullRequestFiles(client, t))
48-
s.AddTool(getPullRequestStatus(client, t))
49-
s.AddTool(getPullRequestComments(client, t))
50-
s.AddTool(getPullRequestReviews(client, t))
45+
s.AddTool(GetPullRequest(client, t))
46+
s.AddTool(ListPullRequests(client, t))
47+
s.AddTool(GetPullRequestFiles(client, t))
48+
s.AddTool(GetPullRequestStatus(client, t))
49+
s.AddTool(GetPullRequestComments(client, t))
50+
s.AddTool(GetPullRequestReviews(client, t))
5151
if !readOnly {
52-
s.AddTool(mergePullRequest(client, t))
53-
s.AddTool(updatePullRequestBranch(client, t))
54-
s.AddTool(createPullRequestReview(client, t))
55-
s.AddTool(createPullRequest(client, t))
52+
s.AddTool(MergePullRequest(client, t))
53+
s.AddTool(UpdatePullRequestBranch(client, t))
54+
s.AddTool(CreatePullRequestReview(client, t))
55+
s.AddTool(CreatePullRequest(client, t))
5656
}
5757

5858
// Add GitHub tools - Repositories
59-
s.AddTool(searchRepositories(client, t))
60-
s.AddTool(getFileContents(client, t))
61-
s.AddTool(listCommits(client, t))
62-
s.AddTool(listBranches(client, t))
59+
s.AddTool(SearchRepositories(client, t))
60+
s.AddTool(GetFileContents(client, t))
61+
s.AddTool(ListCommits(client, t))
62+
s.AddTool(ListBranches(client, t))
6363
if !readOnly {
64-
s.AddTool(createOrUpdateFile(client, t))
65-
s.AddTool(createRepository(client, t))
66-
s.AddTool(forkRepository(client, t))
67-
s.AddTool(createBranch(client, t))
68-
s.AddTool(pushFiles(client, t))
64+
s.AddTool(CreateOrUpdateFile(client, t))
65+
s.AddTool(CreateRepository(client, t))
66+
s.AddTool(ForkRepository(client, t))
67+
s.AddTool(CreateBranch(client, t))
68+
s.AddTool(PushFiles(client, t))
6969
}
7070

7171
// Add GitHub tools - Search
72-
s.AddTool(searchCode(client, t))
73-
s.AddTool(searchUsers(client, t))
72+
s.AddTool(SearchCode(client, t))
73+
s.AddTool(SearchUsers(client, t))
7474

7575
// Add GitHub tools - Users
76-
s.AddTool(getMe(client, t))
76+
s.AddTool(GetMe(client, t))
7777

7878
// Add GitHub tools - Code Scanning
79-
s.AddTool(getCodeScanningAlert(client, t))
80-
s.AddTool(listCodeScanningAlerts(client, t))
79+
s.AddTool(GetCodeScanningAlert(client, t))
80+
s.AddTool(ListCodeScanningAlerts(client, t))
8181
return s
8282
}
8383

0 commit comments

Comments
 (0)