# `ExUtcp.Transports.Grpc.Connection`
[🔗](https://github.com/universal-tool-calling-protocol/elixir-utcp/blob/main/lib/ex_utcp/transports/grpc/connection.ex#L1)

Manages gRPC connections with pooling and lifecycle management.

# `t`

```elixir
@type t() :: %ExUtcp.Transports.Grpc.Connection{
  channel: GRPC.Channel.t(),
  connection_state: :connecting | :connected | :disconnected | :error,
  last_used: DateTime.t(),
  max_retries: non_neg_integer(),
  provider: map(),
  retry_count: non_neg_integer(),
  stub: module()
}
```

# `call_tool`

```elixir
@spec call_tool(pid(), String.t(), map(), timeout()) ::
  {:ok, map()} | {:error, term()}
```

Calls a tool via gRPC.

# `call_tool_stream`

```elixir
@spec call_tool_stream(pid(), String.t(), map(), timeout()) ::
  {:ok, [map()]} | {:error, term()}
```

Calls a tool stream via gRPC.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `close`

```elixir
@spec close(pid()) :: :ok
```

Closes the gRPC connection.

# `get_manual`

```elixir
@spec get_manual(pid(), timeout()) :: {:ok, [map()]} | {:error, term()}
```

Gets the manual (available tools) from the gRPC service.

# `healthy?`

```elixir
@spec healthy?(pid()) :: boolean()
```

Checks if the connection is healthy.

# `start_link`

```elixir
@spec start_link(
  map(),
  keyword()
) :: {:ok, pid()} | {:error, term()}
```

Starts a new gRPC connection process.

---

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