# `OzMcp.Structs.TextResourceContents`
[🔗](https://github.com/oz-elixir/oz_mcp/blob/v0.9.0/lib/oz_mcp/structs/text_resource_contents.ex#L1)

Helper module used to build `TextResourceContents` structure.

_(MCP protocol: 2025-11-25)_

## Short example:

```elixir
%TextResourceContents{}
  |> TextResourceContents.uri("file:///logs/app.log")
  |> TextResourceContents.text("INFO App started")
  |> TextResourceContents.mime_type("text/plain")
  |> TextResourceContents.build()
```

Result:

```elixir
%{
  text: "INFO App started",
  uri: "file:///logs/app.log",
  mimeType: "text/plain"
}
```

Specification: [TextResourceContents](https://modelcontextprotocol.io/specification/2025-11-25/schema#textresourcecontents)

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `uri` | `uri/2` | string | yes |
| `text` | `text/2` | string | yes |
| `mimeType` | `mime_type/2` | string | no |
| `_meta` | `_meta/2` | map | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.TextResourceContents{
  _meta: map() | nil,
  mimeType: String.t() | nil,
  text: String.t(),
  uri: String.t()
}
```

# `build`

```elixir
@spec build(t()) :: map()
```

# `mime_type`

```elixir
@spec mime_type(t(), String.t() | nil) :: t()
```

# `text`

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

# `uri`

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

---

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