# `Wardrik.MCPTools`

Gives an agent the tools of the MCP servers it names. Implements `WardrikCore.Capability`.

Servers are looked up at the start of each turn, so added or removed servers apply from the
next turn. For each name, the first match wins:

  1. The owner's server of that name.
  2. The org's, for a person's agent.
  3. The server Wardrik started with, if it serves the agent's org.

With `all: true`, the agent also gets every server its owners added.

# `key`

```elixir
@spec key(String.t(), String.t()) :: String.t()
```

Returns the `WardrikMCP` name of the server `name` that `owner` added.

    Wardrik.MCPTools.key("acme", "github")
    #=> "acme:github"

# `owners`

```elixir
@spec owners(String.t()) :: [String.t()]
```

Returns the owners whose servers the agent `id` can use: its owner, then the org for a person.

# `picked`

```elixir
@spec picked(atom(), String.t(), keyword()) :: [String.t()]
```

Returns the `WardrikMCP` names of the servers the agent `id` gets for `opts`.

# `served`

```elixir
@spec served(Wardrik.t(), String.t()) :: [String.t()]
```

Returns the names of Wardrik's own servers that serve the agent `id`'s org.

A server serves an org if its `:orgs` lists it, or it has no `:orgs`.

---

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