# `MingaClaudeBridge.Session.Request`
[🔗](https://github.com/jsmestad/minga-claude-bridge/blob/main/lib/minga_claude_bridge/session/request.ex#L1)

One input to a `MingaClaudeBridge.Session`: a new prompt, or the results of the tool calls the previous request ended with.

  * `ref` - identifies the request. The session tags every event for this request with it.
  * `kind` - `{:prompt, content}` where `content` is a string or a list of `MingaClaudeBridge.Wire.Block` values, or `{:tool_results, results}`.
  * `tools` - the tools Minga offers for this request. The session answers `tools/list` and validates `tools/call` against them until the next request.

A tool result is `%{tool_use_id: id, content: [part], is_error: boolean}`, where a part is a `t:MingaClaudeBridge.ToolCalls.part/0`. The request must carry one result for every tool call the previous request ended with.

Content and results are conversation content. Do not log them.

# `kind`

```elixir
@type kind() ::
  {:prompt, String.t() | [MingaClaudeBridge.Wire.Block.t()]}
  | {:tool_results, [tool_result()]}
```

# `t`

```elixir
@type t() :: %MingaClaudeBridge.Session.Request{
  kind: kind(),
  ref: reference(),
  tools: [MingaClaudeBridge.MCP.tool()]
}
```

# `tool_result`

```elixir
@type tool_result() :: %{
  tool_use_id: String.t(),
  content: [MingaClaudeBridge.ToolCalls.part()],
  is_error: boolean()
}
```

# `prompt`

```elixir
@spec prompt(String.t() | [MingaClaudeBridge.Wire.Block.t()], [
  MingaClaudeBridge.MCP.tool()
]) :: t()
```

Builds a prompt request with a new ref.

# `tool_results`

```elixir
@spec tool_results([tool_result()], [MingaClaudeBridge.MCP.tool()]) :: t()
```

Builds a tool-results request with a new ref.

---

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