register_repo
Registers a local repository in the cross-repo registry, enabling it to appear in fleet-wide snapshots. Use once per repository during multi-service Veris setup.
Instructions
Adds a local repository to the user-level cross-repo registry at ~/.veris/registry.json. Subsequent calls to cross_repo_snapshot will include this repo in the fleet view. Setup-time call, typically run once per repo when bootstrapping a multi-service Veris environment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable repo name. Shown in cross-repo snapshots. | |
| path | Yes | Absolute filesystem path to the repository root. | |
| tags | No | Optional tags for grouping (e.g. ['frontend','prod','checkout-flow']). |
Implementation Reference
- src/mcp/McpServer.ts:368-372 (handler)handleRegisterRepo handler: instantiates a CrossRepoRegistry, calls reg.register(name, path, tags), and returns the resulting entry as text.
private handleRegisterRepo(args: any) { const reg = new CrossRepoRegistry(); const entry = reg.register(args.name, args.path, args.tags); return this.text(entry); } - src/mcp/McpServer.ts:79-79 (registration)Case registration in the tool dispatch switch: maps 'register_repo' to handleRegisterRepo(args).
case "register_repo": return this.handleRegisterRepo(args); - src/mcp/McpServer.ts:156-158 (schema)Tool definition for register_repo: requires 'name' (string) and 'path' (string), optional 'tags' (string array). Description explains it adds a repo to ~/.veris/registry.json.
{ name: "register_repo", description: "Adds a local repository to the user-level cross-repo registry at ~/.veris/registry.json. Subsequent calls to cross_repo_snapshot will include this repo in the fleet view. Setup-time call, typically run once per repo when bootstrapping a multi-service Veris environment.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Human-readable repo name. Shown in cross-repo snapshots." }, path: { type: "string", description: "Absolute filesystem path to the repository root." }, tags: { type: "array", items: { type: "string" }, description: "Optional tags for grouping (e.g. ['frontend','prod','checkout-flow'])." } }, required: ["name", "path"] } } - CrossRepoRegistry.register(): resolves the path, checks for existing entry (updates it) or creates a new RepoEntry, persists to ~/.veris/registry.json.
public register(name: string, repoPath: string, tags?: string[]): RepoEntry { const abs = path.resolve(repoPath); const existing = this.data.repos.find(r => r.path === abs); if (existing) { existing.name = name; existing.tags = tags || existing.tags; this.persist(); return existing; } const entry: RepoEntry = { name, path: abs, addedAt: new Date().toISOString(), tags }; this.data.repos.push(entry); this.persist(); return entry; } - RepoEntry interface: shape of a registered repository with name, path, addedAt, and optional tags.
export interface RepoEntry { name: string; path: string; addedAt: string; tags?: string[]; }