# `LocalizeMcp.Index`
[🔗](https://github.com/elixir-localize/localize_mcp/blob/v0.2.0/lib/localize_mcp/index.ex#L1)

Boot-time index of every documented module/function across
`:localize`, `:calendrical`, `:localize_web`, and `:localize_sql`
(all but the first only when loaded).

Built once during application start and cached in
`:persistent_term` so individual tool handlers pay only a map
lookup per call. Rebuild explicitly with `rebuild/0` if a
consumer hot-loads new modules at runtime — not the common case.

Each entry has the shape:

    %{
      module: Localize.Number,
      function: :to_string,
      arity: 2,
      kind: :function,                   # or :module / :type / :callback
      signature: "to_string(number, options \\ [])",
      doc_first_line: "Format a number as a localized string.",
      group: "Numbers",
      package: :localize                  # or :calendrical / :localize_web / :localize_sql
    }

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `entries`

```elixir
@spec entries() :: [map()]
```

Returns the full list of indexed entries.

Reads from `:persistent_term` — O(1) heap copy of the list.

# `rebuild`

```elixir
@spec rebuild() :: :ok
```

Rebuilds the index from scratch. Cheap — runs in under 100 ms on
typical hardware.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the index GenServer.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
