Skip to content

Add consolidated manage_repos tool (list, clone, sync, delete)#419

Closed
jralfonsog wants to merge 9 commits intodatabricks-solutions:mainfrom
jralfonsog:feat/git-repos
Closed

Add consolidated manage_repos tool (list, clone, sync, delete)#419
jralfonsog wants to merge 9 commits intodatabricks-solutions:mainfrom
jralfonsog:feat/git-repos

Conversation

@jralfonsog
Copy link
Copy Markdown

@jralfonsog jralfonsog commented Apr 2, 2026

Summary

  • New consolidated MCP tool: manage_repos(action=...) — 6 actions for Databricks Git Repos management
  • Skill update: Updated databricks-repos skill with consolidated tool examples

Tool consolidation

Action What it does
list List repos, optionally filter by path prefix
get Get repo details by ID
create Clone a Git repo (idempotent)
update Update repo branch/tag checkout
sync Alias for update — pull latest and checkout ref
delete Delete a repo

Includes manifest tracking on create/delete.

Test plan

  • 23 unit tests — all passing
  • Ruff lint + format pass
  • Integration test on aws-fe: list repos, get repo details

This pull request was AI-assisted by Isaac.

Add 5 functions for Databricks Repos CRUD operations:
- list_repos: list repos with optional path prefix filter
- get_repo: get repo details by ID
- create_repo: clone a Git repository into the workspace
- update_repo: switch branch or tag (pulls latest from remote)
- delete_repo: remove a repo from the workspace

Co-authored-by: Isaac
Wrap the 5 core repos functions as MCP tools with manifest tracking:
- list_repos (timeout=30)
- get_repo (timeout=30)
- create_repo (timeout=120, tracks resource in manifest)
- update_repo (timeout=60)
- delete_repo (timeout=30, removes from manifest)

Co-authored-by: Isaac
Cover all 5 functions: list_repos, get_repo, create_repo, update_repo,
delete_repo. Tests include happy paths, error handling, provider validation,
and branch/tag mutual exclusivity.

Co-authored-by: Isaac
Remove extraneous f-string prefix, fix line length, remove unused variable.

Co-authored-by: Isaac
- Docstrings: opening """ on its own line
- MCP module header: add tool listing
- Serialization: use getattr() for defensive SDK object access
- Returns sections: bullet list format for dict keys
- Manifest imports: late imports in try blocks
- Idempotent create: rename to create_or_update_repo with _find_repo_by_url helper

Co-authored-by: Isaac
Replaces list_repos, get_repo, create_or_update_repo, update_repo, and
delete_repo with a single manage_repos(action=...) tool following the
PR databricks-solutions#394 consolidation pattern. Actions: list, get, create, update, sync,
delete. Adds manifest tracking (track_resource/remove_resource) and
exposes _manage_repos_impl for direct unit testing.

Co-authored-by: Isaac
Add 23 MCP-level tests calling _manage_repos_impl() directly, covering
all 6 actions (list, get, create, update, sync, delete), missing params,
idempotent create, manifest tracking/removal, and error passthrough.

Co-authored-by: Isaac
Replace 5 individual tool references with single manage_repos(action=...)
in SKILL.md and git-providers.md. Add actions table showing required and
optional params per action.

Co-authored-by: Isaac
@jralfonsog jralfonsog changed the title Add Git Repos management tools (list, clone, sync, delete) Add consolidated manage_repos tool (list, clone, sync, delete) Apr 7, 2026
@calreynolds
Copy link
Copy Markdown
Collaborator

Thank you for the contribution! While we don't think this content aligns with what we're looking for at this time — we're actively monitoring tool and skill bloat, and require use of our testing framework for contributions to be merged — we appreciate you opening these PRs! While I can't see your name on GitHub, if you're at Databricks feel free to reach out on Slack. 👍

@calreynolds calreynolds closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants