GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(mcp): add repository list/add/rename/remove tools by Ankitsinghsisodya · Pull Request #3823 · knative/func Conversation
|
| Tool | CLI equivalent | Readonly safe |
|---|---|---|
| repository_list | func repository list | Yes |
| repository_add | func repository add <name> <url> | No — blocked in readonly mode |
| repository_rename | func repository rename <old> <new> | No — blocked in readonly mode |
| repository_remove | func repository remove <name> | No — blocked in readonly mode |
Added pkg/mcp/tools_repository_test.go with 11 test cases covering happy path, --verbose forwarding, readonly guards, and executor error propagation.
Release Note
Added MCP tools `repository_list`, `repository_add`, `repository_rename`, and `repository_remove` to manage installed template repositories from an agent context.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi @Ankitsinghsisodya. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Note
Copilot was unable to run its full agentic suite in this review.
Adds MCP tools and server wiring for managing template repositories (list/add/rename/remove), along with unit tests to verify executor invocation, readonly behavior, and error propagation.
Changes:
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| pkg/mcp/tools_repository.go | Implements repository_* MCP tools, inputs/outputs, and handlers that invoke the underlying executor. |
| pkg/mcp/mcp.go | Registers the new repository tools and adds help resources for repository commands. |
| pkg/mcp/tools_repository_test.go | Adds unit tests validating argument passing, readonly blocking, and error propagation for repository tools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| if s.readonly { | ||
| err = fmt.Errorf("the server is currently in readonly mode. Please set FUNC_ENABLE_MCP_WRITE and restart the client") | ||
| return | ||
| } |
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| executor.ExecuteFn = func(ctx context.Context, subcommand string, args ...string) ([]byte, error) { | ||
| argsMap := argsToMap(args) | ||
| if _, ok := argsMap["--verbose"]; !ok { | ||
| t.Fatalf("expected --verbose flag, got args: %v", args) | ||
| } | ||
| return []byte("default\nboson\thttps://github.com/boson-project/templates\n"), nil | ||
| } |
This commit introduces new tools for managing template repositories, including listing, adding, renaming, and removing repositories. Each tool is accompanied by a handler in the MCP server and relevant input/output structures. Additionally, comprehensive tests have been added to ensure the correct functionality of these tools, including error handling and readonly mode checks.
eeb129c to
1f72e32
Compare
Remove double space after period and change "restart the client" to "restart the MCP server" since readonly mode is controlled server-side via FUNC_ENABLE_MCP_WRITE. Co-authored-by: Cursor <[email protected]>
Change the readonly state management to utilize atomic operations for thread safety. Update relevant tests to reflect this change, ensuring that the server correctly checks the readonly state using Load() instead of a direct boolean assignment. This improves the reliability of readonly mode enforcement across repository management operations.
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #3823 +/- ## ========================================== + Coverage 53.44% 53.59% +0.15% ========================================== Files 200 201 +1 Lines 23450 23519 +69 ========================================== + Hits 12533 12606 +73 + Misses 9662 9659 -3 + Partials 1255 1254 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
/approve 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ankitsinghsisodya, lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…-tools Co-authored-by: Cursor <[email protected]> # Conflicts: # pkg/mcp/mcp.go
|
@lkingland, I have resolved the merge conflicts, which caused the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Cursor <[email protected]>
f564305 to
74f85c7
Compare
|
/lgtm |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.