Manage Repos
synapse_manage_reposRegister, list, archive, restore, keep, or unregister repositories and update excluded paths to control indexing and workspace lifecycle.
Instructions
Manages repository registrations. High-level actions include:
'list': lists all configured repositories and their index state. Each row includes suggested_actions with ready-to-fire tool calls.
'register': registers a new workspace for watching and indexing. Git worktrees are transparently auto-detected.
'archive': marks a registered workspace as archived, stops its indexer, and keeps existing graph data searchable.
'restore': marks an archived workspace active again and restarts indexing.
'keep': dismisses a dirty-merged worktree advisory for the current session (signals that uncommitted changes are intentional).
'unregister': permanently removes a repository from the registry and graph store.
'update_excludes': updates the set of excluded paths for a repository. Clean Git worktrees whose branch work is already merged are auto-archived conservatively before indexing work is scheduled.
REPLACES: ls, find for workspace discovery, manual git worktree management. Use this tool instead of these alternatives for better results with 30-60% fewer tokens via automatic compression.
Usage (short): Manage repository registrations, lifecycle, exclusions, and workspace lists.
Usage (long): Use to register new repositories, list registered repositories, manage active/archived lifecycle state, update exclude paths, or unregister repositories.
KEY WORKFLOW — always read suggested_actions first: Each 'list' row (both scoped and unscoped) contains a suggested_actions field with structured objects {label, tool, args}. These are ready-to-fire tool calls — pick the appropriate one and call it directly without reformatting.
DIRTY-MERGED WORKTREE ADVISORY: When a worktree branch is merged but has uncommitted changes, the row will contain dirty_merged_worktree: true and 3 suggested_actions:
archive — keep graph searchable, stop indexing
unregister — delete graph data permanently
keep — changes are intentional, dismiss advisory for this session Call one of these immediately with just repo_id + action.
LIFECYCLE RULES: Use 'archive' for stale or merged worktrees; use 'restore' to reactivate indexing; use 'unregister' only for destructive removal; use 'keep' when changes are intentional.
When registering, you MUST provide an absolute path for root (e.g. /Users/name/repo). Do not use . or relative paths. Always call 'list' first if unsure of the repo_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | CRITICAL: MUST be a full absolute path to the repository (e.g. /Users/name/repo). NEVER use '.' or relative paths. Required for register. | |
| merge | No | When true, append excludes to the existing list instead of replacing it (used in update_excludes) | |
| action | Yes | The action to perform. | |
| exclude | No | Optional relative directory paths to exclude from indexing (used in register, update_excludes) | |
| repo_id | No | Stable identifier for the repository. For 'list': when provided, returns full detail for that one repo only (fast). When omitted, returns an enriched summary of all repos. Required for register, archive, restore, keep, unregister, update_excludes. | |
| max_tokens | No | Approximate final response budget in tokens (500-32000, default 4000). | |
| compress_payload | No | Set false to disable lossless response-key compression. | |
| wait_for_ready_ms | No | Optional timeout in ms to wait for the indexer to finish warming up and enter an idle state before executing. Use to ensure stable results. |