cloud_list
List all repositories in your Relace Cloud account to discover synced repositories, verify sync results, or identify repository IDs for debugging.
Instructions
List all repositories in your Relace Cloud account.
Use to: discover synced repositories, verify cloud_sync results, or identify repository IDs for debugging.
Returns a list of repos with: repo_id, name, auto_index status.
Auto-paginates up to 10,000 repos (safety limit); has_more=True indicates the limit was reached.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/relace_mcp/tools/repo/list.py:10-65 (handler)Core handler logic for the cloud_list tool: lists repositories from Relace Cloud using client.list_repos(), processes summaries with pagination safety limit, and handles errors.def cloud_list_logic(client: RelaceRepoClient) -> dict[str, Any]: """List all repositories in the Relace Cloud account. Uses automatic pagination to fetch all repos (up to 10,000 safety limit). Args: client: RelaceRepoClient instance. Returns: Dict containing: - count: Number of repos returned - repos: List of repo summaries (repo_id, name, auto_index) - has_more: True only if safety limit (10,000 repos) was reached - error: Error message if failed (optional) """ trace_id = str(uuid.uuid4())[:8] logger.info("[%s] Listing cloud repositories", trace_id) try: repos = client.list_repos(trace_id=trace_id) # Extract relevant fields from each repo repo_summaries = [] for repo in repos: metadata = repo.get("metadata") or {} repo_summaries.append( { "repo_id": repo.get("repo_id") or repo.get("id"), "name": metadata.get("name") or repo.get("name"), "auto_index": repo.get("auto_index"), "created_at": repo.get("created_at"), "updated_at": repo.get("updated_at"), } ) # list_repos uses automatic pagination with a safety limit of 100 pages. # has_more is true only if we hit the safety limit (100 * 100 = 10,000 repos). # Note: This may be a false positive if total is exactly 10,000. has_more = len(repos) >= 10000 logger.info("[%s] Found %d repositories", trace_id, len(repo_summaries)) return { "count": len(repo_summaries), "repos": repo_summaries, "has_more": has_more, } except Exception as exc: logger.error("[%s] Cloud list failed: %s", trace_id, exc) return { "count": 0, "repos": [], "has_more": False, "error": str(exc), }
- src/relace_mcp/tools/__init__.py:167-177 (registration)MCP tool registration for 'cloud_list' using @mcp.tool decorator. Thin wrapper that invokes the core cloud_list_logic with the repo_client instance.@mcp.tool def cloud_list() -> dict[str, Any]: """List all repositories in your Relace Cloud account. Use to: discover synced repositories, verify cloud_sync results, or identify repository IDs for debugging. Returns a list of repos with: repo_id, name, auto_index status. Auto-paginates up to 10,000 repos (safety limit); `has_more=True` indicates the limit was reached. """ return cloud_list_logic(repo_client)
- Initialization of the shared RelaceRepoClient used by cloud_list and other repo tools.async def fast_search(query: str, ctx: Context) -> dict[str, Any]: """Run Fast Agentic Search over the configured base_dir. Use this tool to quickly explore and understand the codebase. The search agent will examine files, search for patterns, and report back with relevant files and line ranges for the given query. Queries can be natural language (e.g., "find where auth is handled") or precise patterns. The agent will autonomously use grep, ls, and file_view tools to investigate. This is useful before using fast_apply to understand which files need to be modified and how they relate to each other. """ # Resolve base_dir dynamically from MCP Roots if not configured base_dir, source = await resolve_base_dir(config.base_dir, ctx) effective_config = replace(config, base_dir=base_dir) # Avoid shared mutable state across concurrent calls. return FastAgenticSearchHarness(effective_config, search_client).run(query=query) # Cloud Repos (Semantic Search & Sync) repo_client = RelaceRepoClient(config)