Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit39d7fec

Browse files
authored
Updatelist_commits Filtering Descriptions (#634)
* update sha arg description for list_commits, get_file_contents* update perPage description for pagination to inform of default 30* toolsnaps, docs* revert perPage description
1 parentfc11713 commit39d7fec

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

‎README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
902902
-`path`: Path to file/directory (directories must end with a slash '/') (string, required)
903903
-`ref`: Accepts optional git refs such as`refs/tags/{tag}`,`refs/heads/{branch}` or`refs/pull/{pr_number}/head` (string, optional)
904904
-`repo`: Repository name (string, required)
905-
-`sha`: Accepts optionalgit sha, if sha isspecified it will be used instead of ref (string, optional)
905+
-`sha`: Accepts optionalcommit SHA. Ifspecified, it will be used instead of ref (string, optional)
906906

907907
-**get_tag** - Get tag details
908908
-`owner`: Repository owner (string, required)
@@ -916,12 +916,12 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
916916
-`repo`: Repository name (string, required)
917917

918918
-**list_commits** - List commits
919-
-`author`: Author username or email address (string, optional)
919+
-`author`: Author username or email addressto filter commits by(string, optional)
920920
-`owner`: Repository owner (string, required)
921921
-`page`: Page number for pagination (min 1) (number, optional)
922922
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
923923
-`repo`: Repository name (string, required)
924-
-`sha`:The commitSHA, branchname,or tag name to list commitsfrom. If notspecified, defaults tothe repository's default branch. (string, optional)
924+
-`sha`:CommitSHA, branch or tag name to list commitsof. If notprovided, uses the default branch ofthe repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)
925925

926926
-**list_tags** - List tags
927927
-`owner`: Repository owner (string, required)

‎pkg/github/__toolsnaps__/get_file_contents.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"type":"string"
2424
},
2525
"sha": {
26-
"description":"Accepts optionalgit sha, if sha isspecified it will be used instead of ref",
26+
"description":"Accepts optionalcommit SHA. Ifspecified, it will be used instead of ref",
2727
"type":"string"
2828
}
2929
},

‎pkg/github/__toolsnaps__/list_commits.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"inputSchema": {
88
"properties": {
99
"author": {
10-
"description":"Author username or email address",
10+
"description":"Author username or email address to filter commits by",
1111
"type":"string"
1212
},
1313
"owner": {
@@ -30,7 +30,7 @@
3030
"type":"string"
3131
},
3232
"sha": {
33-
"description":"The commitSHA, branchname,or tag name to list commitsfrom. If notspecified, defaults tothe repository's default branch.",
33+
"description":"CommitSHA, branch or tag name to list commitsof. If notprovided, uses the default branch ofthe repository. If a commit SHA is provided, will list commits up to that SHA.",
3434
"type":"string"
3535
}
3636
},

‎pkg/github/repositories.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ func ListCommits(getClient GetClientFn, t translations.TranslationHelperFunc) (t
111111
mcp.Description("Repository name"),
112112
),
113113
mcp.WithString("sha",
114-
mcp.Description("The commitSHA, branchname,or tag name to list commitsfrom. If notspecified, defaults tothe repository's default branch."),
114+
mcp.Description("CommitSHA, branch or tag name to list commitsof. If notprovided, uses the default branch ofthe repository. If a commit SHA is provided, will list commits up to that SHA."),
115115
),
116116
mcp.WithString("author",
117-
mcp.Description("Author username or email address"),
117+
mcp.Description("Author username or email address to filter commits by"),
118118
),
119119
WithPagination(),
120120
),
@@ -470,7 +470,7 @@ func GetFileContents(getClient GetClientFn, getRawClient raw.GetRawClientFn, t t
470470
mcp.Description("Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head`"),
471471
),
472472
mcp.WithString("sha",
473-
mcp.Description("Accepts optionalgit sha, if sha isspecified it will be used instead of ref"),
473+
mcp.Description("Accepts optionalcommit SHA. Ifspecified, it will be used instead of ref"),
474474
),
475475
),
476476
func(ctx context.Context,request mcp.CallToolRequest) (*mcp.CallToolResult,error) {

‎pkg/github/server.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ func OptionalStringArrayParam(r mcp.CallToolRequest, p string) ([]string, error)
175175
}
176176

177177
// WithPagination returns a ToolOption that adds "page" and "perPage" parameters to the tool.
178-
// The "page" parameter is optional, min 1. The "perPage" parameter is optional, min 1, max 100.
178+
// The "page" parameter is optional, min 1.
179+
// The "perPage" parameter is optional, min 1, max 100. If unset, defaults to 30.
180+
// https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api
179181
funcWithPagination() mcp.ToolOption {
180182
returnfunc(tool*mcp.Tool) {
181183
mcp.WithNumber("page",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp