# `T3.Environments`
[🔗](https://github.com/dl-alexandre/t3-elixir/blob/main/lib/t3/environments.ex#L1)

Environments MCP operations. Pass T3's original string-keyed argument maps.

Tool availability depends on the authenticated server, permission mode and
invocation context. In-app agent tools may not be available to outside clients.
See `T3.Catalog.tools(:environments)` for descriptions and context requirements.

# `link`

```elixir
@spec link(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}
```

Ask the user to link another environment. Linking requires an agent invocation context; returns pending while the user approves.

Requires linked-environment support, which may be disabled or hidden by the server.

# `links`

```elixir
@spec links(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}
```

List linked environments and whether each answers now. Pass environmentId to supported tools to act there.

Requires linked-environment support, which may be disabled or hidden by the server.

# `read`

```elixir
@spec read(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}
```

Read this server's identity and preferences. Providers and models: `orchestrator_capabilities`.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.

# `unlink`

```elixir
@spec unlink(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}
```

Forget a linked environment. The remote session remains until revoked there.

Requires linked-environment support, which may be disabled or hidden by the server.

# `update_preferences`

```elixir
@spec update_preferences(T3.Client.t(), map()) ::
  {:ok, map()} | {:error, T3.Error.t()}
```

Update environment-wide preferences. Live full-access or default caller thread only. Omitted fields are unchanged; `customInstructions: ''` clears it.

Requires a live full-access/default caller thread.

---

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