---
title: "Pages in chat · intentic sandbox API"
description: "Tool calls an MCP app makes while a reader uses it in a chat. Every route in the pages in chat group of the intentic sandbox API."
url: "https://intentic.dev/api/pages/"
---

Agents

# Pages in chat

Tool calls an MCP app makes while a reader uses it in a chat

An agent can show an MCP server's app inside a chat. The app's frame reaches no network of its own, so when a reader uses it and it asks its server for something, the sandbox carries that call. Only a tool the server marks as callable by its app is answered, and without a press only a read-only one.

**POST`/pages/app-call` Call a tool for an MCP app shown in a chat**

Calls one tool of the connected MCP server whose app a chat is showing, on behalf of a reader using that app. Only a tool the server marks as callable by its app is answered, and only on the server the page was shown for. The answer goes back to the app, not to the agent.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `page` required The stored page the app is… | string | body |
| `name` required The tool the app asks to… | string | body |
| `arguments` What the app passes it | object | body |
| `pressed` Whether the reader had just pressed… | boolean | body |

### What comes back

| Field | Type |
| --- | --- |
| `result` The server's answer, as the MCP… | unknown |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/pages/app-call" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"page":"…","name":"nightly changelog","arguments":{"src/app.ts":{},"README.md":{}},"pressed":true}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.pages.appCall({
 "page": "…",
 "name": "nightly changelog",
 "arguments": {
 "src/app.ts": {},
 "README.md": {}
 },
 "pressed": true
});
```

**POST`/pages/errors` Tell the agent that a page it showed threw**

Hands the uncaught errors a page's own scripts threw in a reader's chat to the agent that showed it, as the sandbox's notice inside that agent's running turn, so it fixes the page and draws it again. Only the turn that showed the page hears it, once per drawing, and never for an MCP server's app; afterwards nothing is said, and the reader can ask from the page's own line.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `page` required The stored page that threw, as… | string | body |
| `errors` required Its uncaught errors as its frame… | string[] | body |

### What comes back

| Field | Type |
| --- | --- |
| `told` Whether the agent heard: true when… | boolean |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/pages/errors" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"page":"…","errors":["The repository has no remote configured.","The repository has no remote configured."]}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.pages.reportErrors({
 "page": "…",
 "errors": [
 "The repository has no remote configured.",
 "The repository has no remote configured."
 ]
});
```

More in Agents

[Previous ← Past sessions](https://intentic.dev/api/sessions/)[Next Workflows →](https://intentic.dev/api/workflows/)
