list_repos
Display configured repositories with their label, path, type, and visibility status to help users manage git repository tracking.
Instructions
List all configured repos with their label, path, type, and visibility.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/config-tools.ts:13-28 (handler)Handler logic for the "list_repos" tool, which loads the config and returns a formatted list of repositories.
async () => { const config = loadConfig(); if (config.repos.length === 0) { return { content: [{ type: "text", text: "No repos configured. Use add_repo to add one." }] }; } const lines = config.repos.map((r) => { const vis = r.show ? "visible" : "hidden"; return `[${vis}] ${r.label} (${r.type})\n path: ${r.path}`; }); const header = [ `Status bar: ${config.statusbar.enabled ? "ON" : "OFF"}`, `Show reference repos: ${config.statusbar.showReferenceRepos ? "yes" : "no"}`, "", ].join("\n"); return { content: [{ type: "text", text: header + lines.join("\n\n") }] }; } - src/tools/config-tools.ts:9-12 (registration)Registration of the "list_repos" tool within the McpServer instance.
server.tool( "list_repos", "List all configured repos with their label, path, type, and visibility.", {},