# `Snodo.Pagination`
[🔗](https://github.com/joshrotenberg/snodo/blob/v0.1.0/lib/snodo/pagination.ex#L1)

Stateless, protocol-neutral pagination for MCP list operations.

Routers continue to return complete, deterministically ordered catalogs. The
server applies this policy after dispatch, issuing opaque cursors scoped to
the protocol version, list operation, configured page size, and exact catalog
contents. A catalog change therefore expires outstanding cursors instead of
risking duplicate or skipped entries.

# `operation`

```elixir
@type operation() ::
  :tools_list | :prompts_list | :resources_list | :resource_templates_list
```

# `t`

```elixir
@type t() :: %Snodo.Pagination{page_size: pos_integer()}
```

# `new`

```elixir
@spec new(keyword() | t()) :: t()
```

Builds and validates an immutable pagination policy.

# `page`

```elixir
@spec page(Snodo.Result.t(), String.t(), operation(), map(), t()) ::
  {:ok, Snodo.Result.t()} | {:error, Snodo.Error.t()}
```

Returns one page and attaches a next cursor to result metadata when more entries remain.

---

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