# `DDD.MCP.Registry`
[🔗](https://github.com/blackuprise/vicander/blob/v0.1.1/lib/ddd/mcp/registry.ex#L1)

What an MCP server exposes, checked once when the server is built.

`build!/2` turns the options of `use DDD.MCP.Server` into tools (commands and queries) and
resources (aggregates). It raises `ArgumentError` for anything that would reach a client
broken: an exposed module without a description, two tools with the same name, an entity with
no repository.

# `entity`

```elixir
@type entity() :: %{
  name: String.t(),
  aggregate: module(),
  port: module(),
  description: String.t(),
  lookups: [[atom()]]
}
```

# `t`

```elixir
@type t() :: %DDD.MCP.Registry{
  authorize: term(),
  instructions: term(),
  name: term(),
  read_only: term(),
  repos: term(),
  tools: term(),
  version: term()
}
```

# `tool`

```elixir
@type tool() :: %{
  name: String.t(),
  module: module(),
  kind: :command | :query,
  description: String.t(),
  input_schema: map(),
  params: [String.t()]
}
```

# `build!`

```elixir
@spec build!(module(), keyword()) :: t()
```

---

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