Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion pkg/github/__toolsnaps__/create_or_update_file.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,77 @@
"description": "Content of the file",
"type": "string"
},
"dry_run": {
"description": "Validate the request and report what would happen without writing to GitHub",
"type": "boolean"
},
"end_line": {
"description": "One-based inclusive end line for patch_range.",
"type": "integer"
},
"expected_blob_sha": {
"description": "Current Git blob SHA. Required when modifying an existing file.",
"type": "string"
},
"expected_occurrences": {
"description": "Exact number of search matches required.",
"type": "integer"
},
"message": {
"description": "Commit message",
"type": "string"
},
"operation": {
"description": "Mutation mode. Omitting this keeps the legacy replace behavior.",
"enum": [
"replace",
"patch_text",
"patch_range",
"unified_diff"
],
"type": "string"
},
"owner": {
"description": "Repository owner (username or organization)",
"type": "string"
},
"patch": {
"description": "Single-file unified diff for unified_diff.",
"type": "string"
},
"path": {
"description": "Path where to create/update the file",
"type": "string"
},
"replace": {
"description": "Replacement text for patch_text.",
"type": "string"
},
"replacement": {
"description": "Replacement text for patch_range.",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"search": {
"description": "Exact text to find for patch_text.",
"type": "string"
},
"sha": {
"description": "The blob SHA of the file being replaced. Required if the file already exists.",
"type": "string"
},
"start_line": {
"description": "One-based inclusive start line for patch_range.",
"type": "integer"
}
},
"required": [
"owner",
"repo",
"path",
"content",
"message",
"branch"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"annotations": {
"title": "Create or update file from shared path"
},
"description": "Create or update a single file in a GitHub repository using a UTF-8 text file that already exists on the MCP host under the shared directory.\n\nUse this when the file content is already available on the server and is too large or too awkward to send inline through the MCP tool call.\n\nOnly files inside the configured shared directory are allowed. SHA MUST be provided for existing file updates.",
"inputSchema": {
"properties": {
"branch": {
"description": "Branch to create/update the file in",
"type": "string"
},
"message": {
"description": "Commit message",
"type": "string"
},
"owner": {
"description": "Repository owner (username or organization)",
"type": "string"
},
"path": {
"description": "Repository path where to create/update the file",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sha": {
"description": "The blob SHA of the file being replaced. Required if the file already exists.",
"type": "string"
},
"shared_path": {
"description": "Relative path under the shared directory mounted into the MCP container",
"type": "string"
}
},
"required": [
"owner",
"repo",
"path",
"shared_path",
"message",
"branch"
],
"type": "object"
},
"name": "create_or_update_file_from_shared_path"
}
12 changes: 12 additions & 0 deletions pkg/github/__toolsnaps__/get_file_contents.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
"description": "Get the contents of a file or directory from a GitHub repository",
"inputSchema": {
"properties": {
"end_line": {
"description": "Optional end line for text file reads",
"type": "integer"
},
"max_bytes": {
"description": "Optional maximum UTF-8 bytes to return for text file reads",
"type": "integer"
},
"owner": {
"description": "Repository owner (username or organization)",
"type": "string"
Expand All @@ -26,6 +34,10 @@
"sha": {
"description": "Accepts optional commit SHA. If specified, it will be used instead of ref",
"type": "string"
},
"start_line": {
"description": "Optional start line for text file reads",
"type": "integer"
}
},
"required": [
Expand Down
40 changes: 38 additions & 2 deletions pkg/github/__toolsnaps__/push_files.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"description": "Branch to push to",
"type": "string"
},
"dry_run": {
"description": "Validate the request and report what would happen without writing to GitHub",
"type": "boolean"
},
"files": {
"description": "Array of file objects to push, each object with path (string) and content (string)",
"items": {
Expand All @@ -18,14 +22,46 @@
"description": "file content",
"type": "string"
},
"end_line": {
"type": "integer"
},
"expected_blob_sha": {
"type": "string"
},
"expected_occurrences": {
"type": "integer"
},
"operation": {
"enum": [
"replace",
"patch_text",
"patch_range",
"unified_diff"
],
"type": "string"
},
"patch": {
"type": "string"
},
"path": {
"description": "path to the file",
"type": "string"
},
"replace": {
"type": "string"
},
"replacement": {
"type": "string"
},
"search": {
"type": "string"
},
"start_line": {
"type": "integer"
}
},
"required": [
"path",
"content"
"path"
],
"type": "object"
},
Expand Down
57 changes: 57 additions & 0 deletions pkg/github/__toolsnaps__/push_files_from_shared_paths.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"annotations": {
"title": "Push files from shared paths"
},
"description": "Push multiple UTF-8 text files from the shared directory to a GitHub repository in a single commit.",
"inputSchema": {
"properties": {
"branch": {
"description": "Branch to push to",
"type": "string"
},
"files": {
"description": "Array of file objects to push, each object with path (repository path) and shared_path (relative path under the shared directory)",
"items": {
"additionalProperties": false,
"properties": {
"path": {
"description": "Repository path for the file",
"type": "string"
},
"shared_path": {
"description": "Relative path under the shared directory mounted into the MCP container",
"type": "string"
}
},
"required": [
"path",
"shared_path"
],
"type": "object"
},
"type": "array"
},
"message": {
"description": "Commit message",
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"branch",
"files",
"message"
],
"type": "object"
},
"name": "push_files_from_shared_paths"
}
Loading