# Add go_to_page

> Let the assistant open other pages of the app and show links to them.

Pass `destinations` and `navigate` to `AssistedProvider`. With both, the provider lends `go_to_page` and `show_links`. Without either, it lends neither.

## Name the pages

`destinations` maps a page's name to its path. A path with `:id` takes an id. From `examples/app/app/assistant.tsx`:

```tsx
const destinations = {
  home: "/",
  orders: "/orders",
  order: "/orders/:id",
  customers: "/customers",
  settings: "/settings",
};
```

Define it at module scope, as the example does.

## Pass the router

`navigate` opens a path. In Next.js it is `router.push`. From `examples/app/app/assistant.tsx`:

```tsx
    <AssistedProvider
      runtime={runtime}
      destinations={destinations}
      navigate={(path) => router.push(path)}
    >
```

## What the assistant gets

- `go_to_page({ to, id? })` calls `navigate`, waits up to 5 seconds for the assisted page to change, and answers `Opened <path>.` with the note of the page now open.
- `show_links({ items })` shows a card of links, each a destination with a title and a one-line gist. A click calls `navigate`.

## Keep the paths out of the description

`go_to_page`'s description lists every destination and its path. When the app's own instructions, like a skill, own its pages, the model answers from that list instead. Pass `destinationsDescription` to say something else in its place:

```tsx
<AssistedProvider
  runtime={runtime}
  destinations={destinations}
  destinationsDescription="Activate the product skill for the page names."
  navigate={(path) => router.push(path)}
>
```

The `to` parameter still lists every destination name, so a call stays valid.

The universal instructions tell the assistant to use `go_to_page` when the user asks to go somewhere or the work is on another page. The answers and errors are in the [model context reference](https://superassist.app/reference/model-context.md#built-in-tools).
