# list_repos

Lists the repos this MCP server can reach, and their aliases. On by default in both single-repo and workspace mode; one of the tools that takes no parameters.

Discovery, not analysis. `list_repos` tells the agent what `repo`
values are valid on every other tool. In single-repo mode there's one
alias (`"default"`); in workspace mode it's every configured repo in
the workspace, plus which one is the default. Workspaces are set up in
[Workspace setup](https://docs.repowise.dev/multi-repo/workspace-setup), and the `repo` parameter
is described in [Workspace MCP mode](https://docs.repowise.dev/multi-repo/workspace-mcp). The other
tools are on [MCP tools](https://docs.repowise.dev/mcp/overview).

## When to call

- **In workspace mode**, before passing a `repo` alias to another tool,
  if the agent doesn't already know the workspace's repo names.
- **Rarely needed in single-repo mode**: there's only one repo, and
  every other tool defaults to it.

## Parameters

None. `list_repos()` takes no arguments.

## Returns

**Single-repo mode:**

| Field | Meaning |
|---|---|
| `workspace` | `false` |
| `workspace_root` | `null` |
| `default_repo` | `"default"` |
| `repos` | One entry: `{alias: "default", path, absolute_path, is_default: true}` |
| `hint` | One-line reminder that `repo` is unnecessary in single-repo mode |

**Workspace mode:**

| Field | Meaning |
|---|---|
| `workspace` | `true` |
| `workspace_root` | Absolute path to the workspace root |
| `default_repo` | The default repo's alias |
| `repos` | Every configured repo: `alias`, `path`, `absolute_path`, `is_default`, `indexed_at`, `last_commit_at_index` |
| `hint` | One-line reminder to pass `repo='<alias>'` on tools that accept it |

## Example

```python
list_repos()
```

## Things worth knowing

- **No freshness envelope.** Unlike most tools, `list_repos` doesn't
  carry `_meta.index_behind` / `stale_warning` fields, since it serves
  configuration, not indexed content.
- **Live-reloaded in workspace mode.** The `indexed_at` and
  `last_commit_at_index` fields are re-read from the workspace config on
  each call, so they track a `repowise update` that ran after this MCP
  server started, without a restart.

> **Note**
>
> Pair with any tool that accepts a `repo` parameter: call `list_repos()`
> once at the start of a workspace session, then pass the alias you need
> on `get_context`, `get_risk`, `search_codebase`, and the rest.
