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, and the repo parameter
is described in Workspace MCP mode. The other
tools are on MCP tools.
When to call
- In workspace mode, before passing a
repoalias 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
list_repos()Things worth knowing
- No freshness envelope. Unlike most tools,
list_reposdoesn't carry_meta.index_behind/stale_warningfields, since it serves configuration, not indexed content. - Live-reloaded in workspace mode. The
indexed_atandlast_commit_at_indexfields are re-read from the workspace config on each call, so they track arepowise updatethat ran after this MCP server started, without a restart.
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.