# `ExMCP.Client.Operations.Resources`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.0.0/lib/ex_mcp/client/operations/resources.ex#L1)

Resource operations for ExMCP client.

This module handles all resource-related operations including listing available
resources, reading resource content, and managing resource subscriptions.

# `list_resources`

```elixir
@spec list_resources(ExMCP.Client.Types.client(), ExMCP.Client.Types.request_opts()) ::
  ExMCP.Client.Types.mcp_response()
```

Lists all available resources from the MCP server.

## Options

- `:timeout` - Request timeout (default: 5000)
- `:format` - Response format (default: :struct)

## Examples

    {:ok, resources} = ExMCP.Client.Operations.Resources.list_resources(client)

# `read_resource`

```elixir
@spec read_resource(
  ExMCP.Client.Types.client(),
  ExMCP.Client.Types.uri(),
  ExMCP.Client.Types.request_opts()
) :: ExMCP.Client.Types.mcp_response()
```

Reads a specific resource by its URI.

## Parameters

- `client` - The MCP client process.
- `uri` - The URI of the resource to read.

## Options

- `:timeout` - Request timeout (default: 10000)
- `:format` - Response format (default: :struct)

## Examples

    {:ok, resource_content} = ExMCP.Client.Operations.Resources.read_resource(client, "mcp://example/resource")

# `subscribe_resource`

```elixir
@spec subscribe_resource(
  ExMCP.Client.Types.client(),
  ExMCP.Client.Types.uri(),
  ExMCP.Client.Types.request_opts()
) ::
  ExMCP.Client.Types.mcp_response() | {:ok, ExMCP.Client.Subscription.Ref.t()}
```

Subscribes to changes for a specific resource.

The client will receive notifications when the resource is updated.

## Parameters

- `client` - The MCP client process.
- `uri` - The URI of the resource to subscribe to.

## Options

- `:timeout` - Request timeout (default: 5000)
- `:format` - Response format (default: :struct)

## Examples

    {:ok, subscription} = ExMCP.Client.Operations.Resources.subscribe_resource(client, "mcp://example/resource")

# `unsubscribe_resource`

```elixir
@spec unsubscribe_resource(
  ExMCP.Client.Types.client(),
  ExMCP.Client.Types.uri(),
  ExMCP.Client.Types.request_opts()
) :: ExMCP.Client.Types.mcp_response()
```

Unsubscribes from changes for a specific resource.

## Parameters

- `client` - The MCP client process.
- `uri` - The URI of the resource to unsubscribe from.

## Options

- `:timeout` - Request timeout (default: 5000)
- `:format` - Response format (default: :struct)

## Examples

    {:ok, result} = ExMCP.Client.Operations.Resources.unsubscribe_resource(client, "mcp://example/resource")

---

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