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
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/create_or_update_file.snap
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"annotations": {
3
3
"title": "Create or update file"
4
4
},
5
-
"description": "Create or update a single file in a GitHub repository. \nIf updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.\n\nIn order to obtain the SHA of original file version before updating, use the following git command:\ngit ls-tree HEAD\u003cpath to file\u003e\n\nIf the SHA is not provided, the tool will attempt to acquire it by fetching the current file contents from the repository, which may lead to rewriting latest committed changes if the file has changed since last retrieval.\n",
5
+
"description": "Create or update a single file in a GitHub repository. \nIf updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.\n\nIn order to obtain the SHA of original file version before updating, use the following git command:\ngit rev-parse HEAD:\u003cpath to file\u003e\n\nSHA MUST be provided for existing file updates.\n",
6
6
"inputSchema": {
7
7
"properties": {
8
8
"branch": {
@@ -30,7 +30,7 @@
30
30
"type": "string"
31
31
},
32
32
"sha": {
33
-
"description": "The blob SHA of the file being replaced.",
33
+
"description": "The blob SHA of the file being replaced. Required if the file already exists.",
If updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.
324
323
325
324
In order to obtain the SHA of original file version before updating, use the following git command:
326
-
git ls-tree HEAD<path to file>
325
+
git rev-parse HEAD:<path to file>
327
326
328
-
If the SHA is not provided, the tool will attempt to acquire it by fetching the current file contents from the repository, which may lead to rewriting latest committed changes if the file has changed since last retrieval.
327
+
SHA MUST be provided for existing file updates.
329
328
`),
330
329
Annotations: &mcp.ToolAnnotations{
331
330
Title: t("TOOL_CREATE_OR_UPDATE_FILE_USER_TITLE", "Create or update file"),
@@ -360,7 +359,7 @@ If the SHA is not provided, the tool will attempt to acquire it by fetching the
360
359
},
361
360
"sha": {
362
361
Type: "string",
363
-
Description: "The blob SHA of the file being replaced.",
362
+
Description: "The blob SHA of the file being replaced. Required if the file already exists.",
0 commit comments