# Preview and Limit Methods

Preview methods are ideal for quoting expected returns in your UI before a user submits a transaction.

```tsx
const expectedShares = await client.previewDeposit({ vault, assets });
const requiredAssets = await client.previewMint({ vault, shares });
const expectedAssets = await client.previewRedeem({ vault, shares });
```

Limit methods help the frontend determine whether a user has sufficient balance and whether direct withdraw/redeem flows are available.

```tsx
const maxAssetsToDeposit = await client.maxDeposit({ vault, receiver });
const maxAssetsToWithdraw = await client.maxWithdraw({ vault, owner });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://city-protocol.gitbook.io/docs/software-development-kit/vault/preview-and-limit-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
