# `BB.MCP.Robots`
[🔗](https://github.com/beam-bots/bb_mcp/blob/main/lib/bb/mcp/robots.ex#L5)

Resolves between agent-facing robot name strings and robot modules.

Robot names are derived from the last segment of the module name, lowercased.

    MyApp.WX200    -> "wx200"
    MyApp.SO101    -> "so101"
    MyApp.Robot    -> "robot"
    MyApp.Two.Word -> "two_word" (only when the segment is itself camel-cased,
                                  e.g. `MyApp.TwoWord` -> "two_word")

# `config`

```elixir
@type config() :: %{required(String.t()) =&gt; module()}
```

# `build!`

```elixir
@spec build!([module()]) :: config()
```

Build a name → module map from a list of robot modules, raising on collisions.

# `fetch`

```elixir
@spec fetch(config(), String.t()) :: {:ok, module()} | {:error, :unknown_robot}
```

Look up a robot module by name. Returns `{:ok, module}` or `{:error, :unknown_robot}`.

# `name_for`

```elixir
@spec name_for(module()) :: String.t()
```

The agent-facing name for a robot module.

# `to_list`

```elixir
@spec to_list(config()) :: [{String.t(), module()}]
```

List all configured robots as `{name, module}` tuples, sorted by name.

---

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