list_variants
Lists each indexed build's variant, image, board, config hash, symbol count, and memory map. Use it to verify what the index actually contains, including builds no longer declared in config.
Instructions
List every indexed build with its (variant, image, board) identity.
Read-only diagnostic — shows what is actually indexed, not what the config
declares. Each row is one (variant, image) build with its own
config_hash and symbol count. For single-project indexes this returns
one row with variant/image empty.
This and get_active_build are the two tools that say what a query can
choose from. Both read the index, thus a build written by
fw-context index --build --variant X is listed even when config.toml
no longer declares X — and resolve_build fails closed on that same
fact, so the two never disagree about whether a choice must be made.
Use get_active_build for the mandatory first-call health check and the
human-readable variants/images discovery; use this tool to see the
per-build config_hash and symbol counts (authoritative per-build state).
Args: project_root: Project root directory. Auto-detected from CWD if omitted. project: Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both.
Returns: dict: {builds (list[dict]), multi (bool — True when the config declares variants or a build has a non-empty variant name)}.
Each build dict holds: variant (str — empty for a single-project
index), image (str — empty for a single-project index), board (str),
config_hash (str), symbol_count (int), file_count (int),
manifest_verification (str — "full" or "none"),
entry_point (str — the `ENTRY()` of the linker script of this build,
empty when no script names one),
memory (list[dict] — the `MEMORY` regions of this build:
{name, attributes, origin, length, origin_value, length_value,
file_path, line}). `origin` and `length` are the expression the
script writes; `origin_value` and `length_value` are numbers, and
they are None for an expression that names a symbol such as
`ORIGIN(RAM) + LENGTH(RAM)`. Empty for a build whose system
records no linker script — see the note below.
THIS is where a per-build memory map lives, not in the `images`
list of ``get_active_build``: that list holds one entry per image
NAME, and one name can belong to two variants with different
addresses.
When the project is not initialized, or has no index, the result is
{builds: [], multi: False, error (str)}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both. | |
| project_root | No | Project root directory. Auto-detected from CWD if omitted. This field also accepts a project name or a project_id, but project is the clear field for those. |