---
name: ainox-app-builder
description: "Let Claude Code, Cursor or any MCP client build, read and publish your App Builder apps with an API key. Use when connecting an MCP client to App Builder with an AINOX_API_KEY, building or publishing an app over MCP, or calling its tools: list_apps, get_app, create_app, send_message, list_messages, resolve_tool_call, stop_run, list_files, read_file, publish, set_marketplace_listing, list_marketplace."
---

# App Builder over MCP (/docs/features/app-builder-mcp)

App Builder has a [Model Context Protocol](https://modelcontextprotocol.io)
server. Connect an MCP client such as Claude Code, Cursor, VS Code or Codex
with an API key, and it can start apps, follow the agent while it builds, read
the code it wrote and publish the site, all without opening App Builder.

The agent inside App Builder still does the building. Your client sends it
prompts, waits, and reads the result. Every app it starts is an ordinary app:
it shows in App Builder's sidebar, and you can open it there at any time. See
[Build an app by chatting](https://0.0.0.0:3003/docs/features/app-builder) for App Builder in the
browser.

## Prerequisites [#prerequisites]

- Access to App Builder in the workspace, which comes with workspace
  membership. An account without it sees neither the scope nor the connection
  details below.
- An API key with the **App Builder (MCP)** scope, created in the workspace the
  apps should live in. A key belongs to one workspace: it reaches your apps in
  that workspace only.

## What a client can do [#what-a-client-can-do]

| Task | Tools |
| --- | --- |
| Find your apps | `list_apps`, `get_app` |
| Start an app, or ask for changes | `create_app`, `send_message` |
| Follow the agent's reply | `get_app`, `list_messages` |
| Answer the agent's questions | `resolve_tool_call` |
| Read the code | `list_files`, `read_file` |
| Publish the site | `publish` |
| Share it to the Marketplace, or find others' apps | `set_marketplace_listing`, `list_marketplace` |
| Cancel a reply | `stop_run` |

A client cannot rename or delete an app, change who can open its site, or take
the site down. Do those in App Builder.

See [Build an app over MCP](https://0.0.0.0:3003/docs/features/app-builder-mcp-workflow) for the
loop a client follows, and the [tool reference](https://0.0.0.0:3003/docs/features/app-builder-mcp-tools)
for every tool.

## Set it up [#set-it-up]

1. Open **App Builder**. Under the prompt on the **New app** page, **Set up a
   key** takes you to the API access settings, and **Read the guide** opens
   this page.

   ![The New app page with the MCP line under the prompt](https://0.0.0.0:3003/screenshots/app-builder-mcp/01-launcher-entry.png)

2. On **Settings › API access**, click **Create key**. Name the key after where
   it will live, such as `Claude Code on my laptop`, and tick **App Builder
   (MCP)** in the scopes table. A key only needs this one scope to use App
   Builder; add others only if the same tool also calls the rest of the API.

   ![The Create API access key dialog with App Builder (MCP) ticked](https://0.0.0.0:3003/screenshots/app-builder-mcp/02-create-key-dialog.png)

   A key with this scope allows **120 requests a minute**, the most the MCP
   server accepts. The rate limit defaults to 120 a minute. A lower rate, or a
   window shorter than 60 seconds under **Advanced options**, is refused,
   because the key would run out before the server does.

3. Click **Create key** and copy the key. It is shown only once.

   ![The new key, hidden, with its Copy button](https://0.0.0.0:3003/screenshots/app-builder-mcp/03-key-created.png)

4. The key appears in the list with the **App Builder (MCP)** scope.

   ![The key list with the new key and its App Builder (MCP) scope](https://0.0.0.0:3003/screenshots/app-builder-mcp/04-key-list.png)

5. Below your keys, **Connect App Builder** shows the MCP endpoint with a copy
   button, and the setup for each client. Follow
   [Connect a client](https://0.0.0.0:3003/docs/features/app-builder-mcp-connect) from here.

   ![The Connect App Builder section with the endpoint and the client tabs](https://0.0.0.0:3003/screenshots/app-builder-mcp/05-connect-block.png)

## How the server works [#how-the-server-works]

- **One endpoint.** MCP over Streamable HTTP at `/v1/mcp/builder` on the AINOX
  API, the address **Connect App Builder** shows.
- **One header.** Send the key as `Authorization: Bearer <key>` on every
  request.
- **No session.** Every request stands alone: there is no session to open or
  keep alive, and a client may call `tools/list` or `tools/call` straight away.
- **One call per request.** Send one JSON-RPC message per request; a batch (a
  JSON array) is refused.
- **Tools return at once.** The agent keeps working after `create_app`,
  `send_message`, `resolve_tool_call` and `publish` answer. The client polls
  `get_app` to see where it stands.

- **Audited as you, through the key.** A publish, and a Marketplace listing
  change, made over MCP appear in the workspace's **Settings › Audit Log** under
  your name, with "Through API key “&lt;key name&gt;”" at the end of the row,
  so admins can tell which key made them.

<Callout type="warn" title="A key is your account">
Anything that holds the key can read your apps and publish them as you, in the
key's workspace. Keep it in an environment variable or a secret store, not in a
committed file, and give each machine or tool its own key so you can revoke one
without breaking the others.
</Callout>

## Give your agent this guide [#give-your-agent-this-guide]

The pages of this guide are also served as one agent skill at
[`/skills/app-builder/SKILL.md`](https://0.0.0.0:3003/skills/app-builder/SKILL.md) on this site.
For Claude Code, save it as `~/.claude/skills/ainox-app-builder/SKILL.md`; the
agent then reads it when you ask it to work with App Builder.

## Revoke a key [#revoke-a-key]

On **Settings › API access**, click the bin icon on the key and confirm. A
client using it is refused from its next request. **Rotate key** issues a new
key with the same name, scopes, lifetime and rate limit, and revokes the old
one. A key with **App Builder (MCP)** that allowed fewer than 120 requests a
minute comes back with 120.

# Connect an MCP client (/docs/features/app-builder-mcp-connect)

Every client needs the same two things: the MCP endpoint, and an API key with
the **App Builder (MCP)** scope sent as `Authorization: Bearer <key>`.
[App Builder over MCP](https://0.0.0.0:3003/docs/features/app-builder-mcp#set-it-up) shows how to
create the key.

## Copy the endpoint [#copy-the-endpoint]

Open **Settings › API access**. Under **Connect App Builder**, the **MCP
endpoint** field holds the address for this AINOX installation, ending in
`/v1/mcp/builder`. Click its copy button. The examples below write it as
`<endpoint>`.

The same section has every snippet on this page with your endpoint already
filled in, one tab per client, each with its own copy button.

![The Connect App Builder section, Cursor tab](https://0.0.0.0:3003/screenshots/app-builder-mcp/06-connect-cursor.png)

## Keep the key in a variable [#keep-the-key-in-a-variable]

The snippets read the key from an `AINOX_API_KEY` environment variable, so it
never lands in a file you might commit:

```sh
export AINOX_API_KEY="<your key>"
```

## Add the server [#add-the-server]

<Tabs items={["Claude Code","Cursor","VS Code","Codex","HTTP"]}>
<Tab value="Claude Code">
Add it for yourself, in every project:

```sh
claude mcp add --transport http --scope user ainox <endpoint> \
  --header "Authorization: Bearer $AINOX_API_KEY"
```

Your shell expands `$AINOX_API_KEY` before the command runs, so Claude Code
stores the key itself in `~/.claude.json`. After you rotate the key, run the
command again.

To keep the key out of files, use `.mcp.json` instead, in a repository or
your home folder. Claude Code expands `${AINOX_API_KEY}` each time it
starts, so the file holds only the variable's name and each teammate uses
their own key:

```json title=".mcp.json"
{
  "mcpServers": {
    "ainox": {
      "type": "http",
      "url": "<endpoint>",
      "headers": { "Authorization": "Bearer ${AINOX_API_KEY}" }
    }
  }
}
```

Run `/mcp` inside Claude Code to check that `ainox` is connected.
</Tab>

<Tab value="Cursor">
Add the server to `~/.cursor/mcp.json` for every project, or
`.cursor/mcp.json` for one:

```json title="~/.cursor/mcp.json"
{
  "mcpServers": {
    "ainox": {
      "headers": { "Authorization": "Bearer ${env:AINOX_API_KEY}" },
      "url": "<endpoint>"
    }
  }
}
```

Cursor reads the variable from the environment it was started in, so start
it from a shell where `AINOX_API_KEY` is set.
</Tab>

<Tab value="VS Code">
Add the server to `.vscode/mcp.json`. VS Code asks for the key the first
time and stores it securely:

```json title=".vscode/mcp.json"
{
  "inputs": [
    {
      "description": "AINOX API key",
      "id": "ainox-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "ainox": {
      "headers": { "Authorization": "Bearer ${input:ainox-api-key}" },
      "type": "http",
      "url": "<endpoint>"
    }
  }
}
```
</Tab>

<Tab value="Codex">
Add the server to `~/.codex/config.toml`. Codex sends the variable's value
as the bearer token:

```toml title="~/.codex/config.toml"
[mcp_servers.ainox]
url = "<endpoint>"
bearer_token_env_var = "AINOX_API_KEY"
```
</Tab>

<Tab value="HTTP">
Each request is one JSON-RPC message posted to the endpoint. The `Accept`
header must list both JSON and event streams:

```sh
curl -s <endpoint> \
  -H "Authorization: Bearer $AINOX_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

The server keeps no session, so `tools/list` and `tools/call` work without
an `initialize` handshake. Send one message per request: a JSON array of
messages is refused. A tool's result is in `result.structuredContent`.
When `result.isError` is `true`, `result.content[0].text` is one sentence
saying why.
</Tab>
</Tabs>

## Check the connection [#check-the-connection]

Ask your agent to "list my AINOX apps". It should call `list_apps` and show
your most recently updated apps in the key's workspace. If it is refused, see
[Troubleshooting](https://0.0.0.0:3003/docs/features/app-builder-mcp-troubleshooting).

## Coming from the old App Builder [#coming-from-the-old-app-builder]

The old App Builder's server had a different address and accepted the key in
an `x-api-key` header. Neither works here. In an old config:

1. Replace the URL (it ended in `/api/mcp/code/mcp`) with the endpoint from
   **Connect App Builder**.
2. Replace `x-api-key: <key>` with `Authorization: Bearer <key>`.
3. Create a new key with the **App Builder (MCP)** scope: keys from the old App
   Builder do not carry over.
4. Send the key on `tools/list` too. The old server listed its tools without a
   key; this one answers every request without a key with
   `Missing or malformed Authorization header.`
5. Rename `list_threads`, `get_thread` and `create_thread` in any saved prompts
   or scripts to `list_apps`, `get_app` and `create_app`, and `threadId` to
   `appId`.

# Build an app over MCP (/docs/features/app-builder-mcp-workflow)

Tools that start work answer right away. The agent inside App Builder keeps
working, and your client checks on it with `get_app`. An app's `status` is one
of three:

| `status` | Meaning | What to do next |
| --- | --- | --- |
| `running` | The agent is replying. | Wait, then call `get_app` again, or cancel with `stop_run`. |
| `waiting` | The agent paused on a question for you. | Read `pendingToolCalls` and answer with `resolve_tool_call`. |
| `idle` | The reply is finished. | Read it with `list_messages`, then `send_message` or `publish`. |

An app takes one turn at a time, whether it comes from your client or from
someone typing in App Builder. While a turn runs, a new prompt from either side
is refused until it finishes.

## The loop [#the-loop]

1. **Start an app.** Call `create_app` with what to build, in plain language:

   ```json
   { "prompt": "A one-page tip calculator with a dark theme" }
   ```

   It returns the new `appId`, the `runId` of the agent's reply, and a `url`
   that opens the app in App Builder, where you can watch the agent work.

2. **Poll until the agent stops.** Call `get_app` every few seconds until
   `status` is no longer `running`. A first version often takes a minute or
   more. Keep the interval at two seconds or longer: each key allows 120
   requests a minute, shared by everything that uses it.

3. **Answer any questions.** When `status` is `waiting`, `pendingToolCalls`
   lists what the agent is waiting on. Answer each with `resolve_tool_call`,
   which resumes the reply, then go back to polling. See
   [Answering questions](#answering-questions).

4. **Read the reply and the code.** Once `status` is `idle`, `list_messages`
   returns the conversation: each message's text and the names of the tools
   the agent called. `list_files` and `read_file` read the project itself. The
   first call after the app has sat idle can take a while, because it starts
   the app's sandbox again.

5. **Ask for changes.** Call `send_message` with a follow-up prompt and poll
   again. It is refused while the app is `running` or `waiting`.

6. **Publish.** Call `publish`. The first publish needs a `name`, which becomes
   the app's title and its site's address (`My App` becomes `my-app`, or
   `my-app-2` when that is taken; a name with no Latin letters or digits gets a
   short random address):

   ```json
   { "appId": "…", "name": "Tip calculator" }
   ```

   It returns the `deploymentId` and the site's `url`, but the build runs
   afterwards. Poll `get_app` until `deployment.status` is `published`. Publish
   again after later changes to update the same site; `name` is ignored from
   then on, so the address does not change.

7. **Share it, if you like.** A published site that everyone in the workspace
   (or anyone with the link) can open can be listed in the workspace's
   Marketplace with `set_marketplace_listing`. Who can open a site is set in
   App Builder, under **Share**. Wait for the first publish to reach
   `published` before listing: while it is `queued` or `building`, the listing
   is refused with "Wait for the app to finish publishing, then share it."

## Answering questions [#answering-questions]

The agent asks with its `ask_user` tool, often before it starts a new app or a
large feature, so a new app often stops at `waiting` before any code is
written. Each entry in `pendingToolCalls` has the `runId` and `toolCallId` to
send back, a `toolName`, a `kind` of `answers`, and the questionnaire in
`input`, whose `questions` each have an `id`, a `type` and the `options` to
choose from. Answer with an `answers` object keyed by question ID:

| Question `type` | Answer value |
| --- | --- |
| `single_select` | One option's label, as a string |
| `multi_select` | An array of option labels |
| `text` | The text of the answer |
| An optional question | `null` to skip it |

```json
{
  "appId": "…",
  "runId": "…",
  "toolCallId": "…",
  "answers": { "palette": "Dark", "features": ["Split the bill", "Round up"] }
}
```

`resolve_tool_call` answers questionnaires only. A call with `kind: "approval"`
cannot be approved or declined over MCP: open the app in App Builder and answer
it there.

## Publishing states [#publishing-states]

`get_app` includes `deployment` once the app has been published. Its `status`
moves through these values:

| `status` | Meaning |
| --- | --- |
| `extracting` | Unpacking the project. |
| `uploading` | Storing the source for the build. |
| `queued` | Waiting for a build worker. |
| `building` | Building the site and applying its database migrations. |
| `published` | Live at `deployment.url`. |
| `failed` | Stopped. `deployment.reason` says why; fix it and publish again. |

`deployment.live` is `true` while an earlier publish is still serving the site,
even when the latest one failed. Do not call `publish` again while a publish is
in progress.

If a workspace manager or a platform admin takes the site down, `deployment`
and `marketplace` become `null` and `siteTakenDown` is `true`. The app, its
chat and its files stay. Call `publish` to put it online again at a new
address; `siteTakenDown` turns `false` as soon as that publish starts.

## Stopping a reply [#stopping-a-reply]

`stop_run` cancels the reply in progress and returns `stopped: false` when
nothing was running. A question the agent is waiting on stays pending, so a
`waiting` app still needs `resolve_tool_call` before it takes a new prompt.

## What a client cannot do [#what-a-client-cannot-do]

The MCP server cannot rename an app, delete it, change who can open its site,
take the site down, or upload files with a prompt. Do those in App Builder.

# MCP tool reference (/docs/features/app-builder-mcp-tools)

This page is rendered from the same table the server answers `tools/list`
with, so it always matches what your client sees. Each tool takes one JSON
object of arguments.

Before you call them, two rules apply to every tool:

- **One request, one call.** Send one JSON-RPC message per HTTP request. A
  batch (a JSON array of messages) is refused with HTTP 400, and every request
  counts once against the key's 120 a minute.
- **Refusals are results.** A call the server refuses answers a normal tool
  result with `isError: true` and one sentence in `content[0].text` saying
  why. [Troubleshooting](https://0.0.0.0:3003/docs/features/app-builder-mcp-troubleshooting) lists
  them.

`resolve_tool_call` answers the agent's questionnaires (`ask_user`) only. It
cannot approve or decline a tool call that waits for approval: answer that in
App Builder.

## Tools [#tools]

### `list_apps` [#list_apps]

List the signed-in account's 50 most recently updated apps in this workspace, newest first. Each app has its ID, title, last update time, and the deployment ID once the app has been published.

Takes no arguments.

### `get_app` [#get_app]

Get one app: its title, link, whether the agent is running, waiting on a tool call, or idle, the tool calls waiting on you, the published deployment with its build status, and its Marketplace listing. siteTakenDown is true when a workspace manager or platform admin took the app's site down and it was not published since: deployment is then null, and the next publish gives the app a new address.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |

### `create_app` [#create_app]

Start a new app: the agent begins building from the prompt in its own sandbox. Returns at once; poll get_app until status is no longer running, then read the reply with list_messages.

| Argument | Type | Description |
| --- | --- | --- |
| `prompt` | `string` | What to build or change, in plain language. 1–20,000 characters. |

### `send_message` [#send_message]

Send a follow-up prompt to an idle app. Returns at once; poll get_app until status is no longer running, then read the reply with list_messages.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |
| `prompt` | `string` | What to build or change, in plain language. 1–20,000 characters. |

### `list_messages` [#list_messages]

Read an app's conversation, oldest first: each message's text and the tools the agent called, without tool inputs or outputs. Use list_files and read_file for the code.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |

### `resolve_tool_call` [#resolve_tool_call]

Answer the questionnaire the agent is waiting on (an ask_user call in pendingToolCalls from get_app), which resumes the run. Send answers keyed by question ID: the option label for single_select, an array of labels for multi_select, text for text, or null to skip an optional question.

| Argument | Type | Description |
| --- | --- | --- |
| `answers` | `{ [id]: string \| string[] \| null }` | Answers keyed by question ID. |
| `appId` | `string` | App ID from list_apps or create_app. |
| `runId` | `string` | runId of the pending call, from get_app. |
| `toolCallId` | `string` | toolCallId of the pending call, from get_app. |

### `stop_run` [#stop_run]

Stop the agent's reply in an app. A tool call it is waiting on stays pending.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |

### `list_files` [#list_files]

List one directory of the app's project. Wakes the app's sandbox if it has stopped.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |
| `path` (optional) | `string` | Path relative to the project root, which is `.`. default `"."`. |

### `read_file` [#read_file]

Read one text file of the app's project. Wakes the app's sandbox if it has stopped.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |
| `path` | `string` | Path relative to the project root, which is `.`. |

### `publish` [#publish]

Publish the app to its site, reusing the app's deployment when it has one. The first publish needs the app's name, which becomes the app's title and the site's subdomain. The build runs after this returns; poll get_app for deployment.status until it is published or failed. Do not call again while a publish is in flight.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |
| `name` (optional) | `string` | The app's name, required on the first publish and ignored after; it sets the site's address, such as my-app.\<host\>, numbered when taken. 1–200 characters. |

### `set_marketplace_listing` [#set_marketplace_listing]

Share the app's published site to this workspace's Marketplace, where every member can find it with your name and avatar, or take it out with listed false. Listing needs a published site that everyone in the workspace, or anyone with the link, can open; while the first publish is still queued or building it is refused until deployment.status is published, and an app whose site was taken down (siteTakenDown in get_app) is refused until it is published again. categories replaces the whole set (0–5, each 1–30 characters, each named once; a name the workspace already has, in any case, takes that category and its spelling; a category nobody used before is created with the tag icon, which its creator can change in App Settings); omit it to keep the current set. Taking an app out removes its categories, and hides everyone's favorites of it until it is listed again. Calling again with the same values changes nothing.

| Argument | Type | Description |
| --- | --- | --- |
| `appId` | `string` | App ID from list_apps or create_app. |
| `categories` (optional) | `string[]` | The app's categories, such as ["HR", "Productivity"]; at most 5. at most 5. |
| `listed` | `boolean` | true to list the app, false to take it out. |

### `list_marketplace` [#list_marketplace]

List the apps in this workspace's Marketplace, newest first, the same ones the Marketplace page shows for the same filters, including apps colleagues shared with you. query matches app names, owner names, and categories, ignoring case; categoryId keeps the apps in that one category (each app lists its categories with their IDs); scope shared keeps only the apps shared with you. Returns up to limit apps; pass nextCursor back as cursor for the next page.

| Argument | Type | Description |
| --- | --- | --- |
| `categoryId` (optional) | `string` | Keep the apps in this one category; each app lists its categories with their IDs. |
| `cursor` (optional) | `string` | nextCursor from the previous page. 0–512 characters. |
| `limit` (optional) | `integer` | Apps per page. 1–100. default `24`. |
| `query` (optional) | `string` | Matches app names, owner names and categories, ignoring case. 0–100 characters. |
| `scope` (optional) | `"all" \| "shared"` | shared keeps only the apps shared with you. default `"all"`. |

# MCP troubleshooting (/docs/features/app-builder-mcp-troubleshooting)

The server refuses in two ways. A request it will not serve at all gets an HTTP
error with a JSON body. A tool call it serves but refuses gets a tool result
with `isError: true` and one sentence in `content[0].text`. Both are listed
below with what to do.

## The request is refused [#the-request-is-refused]

| HTTP | Message | What to do |
| --- | --- | --- |
| 401 | `Missing or malformed Authorization header.` | Send `Authorization: Bearer <key>`. If the header reads `Bearer ${AINOX_API_KEY}`, your client did not expand the variable: set it in the environment the client starts from, then restart the client. |
| 401 | `Invalid API access key.` / `API access key not found.` | The key is mistyped or cut short, or it was deleted. Copy the whole key again, or create one. |
| 401 | `API access key has been revoked.` | The key was revoked, or rotated (rotating revokes the old key). Use the new key, or create one. |
| 401 | `API access key has expired.` | Create a new key, or rotate the old one before it expires. **Settings › API access** marks keys that expire within 14 days. |
| 401 | `API access key is not valid for this organization.` | The key's owner is no longer a member of the key's workspace. Ask to be added back, or use a key from a workspace you belong to. |
| 403 | `Required scope 'builder:mcp' is not granted to this API access key.` | The key lacks the **App Builder (MCP)** scope. Scopes cannot be added to an existing key: create a new key with it. |
| 429 | `Rate limit exceeded. Please retry later.` | The key sent more than 120 requests in a minute. Wait the seconds in the `Retry-After` header, then poll more slowly, or give each tool its own key. |
| 429 | `API access key rate limit exceeded.` | The key's own limit is lower than the server's. Keys created with **App Builder (MCP)** allow 120 a minute; an older key with this scope may allow fewer. Rotate it on **Settings › API access**: the new key gets 120 a minute. |
| 400 | `Batches are not supported: send one JSON-RPC message per request.` | Send each message in its own request. |
| 405 | `Method not allowed: this MCP server is stateless.` | Send `POST`. The server opens no event stream and keeps no session, so `GET` and `DELETE` are refused; a client that insists on a session is not supported. |

### A config from the old App Builder [#a-config-from-the-old-app-builder]

The old server lived at a different address ending in `/api/mcp/code/mcp` and
accepted `x-api-key: <key>`. Against the new endpoint, `x-api-key` alone gets
`Missing or malformed Authorization header.` Change the URL to the one under
**Connect App Builder**, send the key as `Authorization: Bearer <key>`, and use a
new key with the **App Builder (MCP)** scope. The old server also answered
`tools/list` without a key; this one needs the key on every request.
[Connect an MCP client](https://0.0.0.0:3003/docs/features/app-builder-mcp-connect#coming-from-the-old-app-builder)
has the full list.

## A tool call is refused [#a-tool-call-is-refused]

### The app [#the-app]

| Message | What to do |
| --- | --- |
| `Builder app <id> was not found.` | The app does not exist, was deleted, belongs to someone else, or lives in another workspace than the key's. Call `list_apps` for IDs you can use. |
| `Member token limit reached. Resets at <time>. Ask a workspace admin to change or pause the limit.` | You used your share of the workspace's AI budget. Wait until the time shown, or ask an admin. No app is created when `create_app` is refused this way. |

### Prompts and turns [#prompts-and-turns]

| Message | What to do |
| --- | --- |
| `The agent is still replying: wait for it, or stop it with stop_run.` | The app takes one turn at a time, from your client or from App Builder. Poll `get_app` until `status` is not `running`, or call `stop_run`. |
| `The agent is waiting on a tool call: answer it with resolve_tool_call first.` | Answer every entry in `pendingToolCalls` first; `stop_run` does not clear them. |
| `A version is being restored. Send your message once it finishes.` | Someone is restoring an earlier version in App Builder. Try again in a moment. |
| `No pending tool call with that runId and toolCallId: get_app lists the current ones.` | The question was already answered, perhaps in App Builder, or the IDs come from an older `get_app`. Call `get_app` again. |
| `<tool> waits for approval, which MCP cannot give: answer it in App Builder.` | Open the app in App Builder and approve or decline it there. |
| `The answers do not fit the questionnaire` | Answer with the question IDs from `input.questions`, and each option label exactly as offered. |
| `The running turn did not confirm the stop. Try again.` | Call `stop_run` again. If App Builder restarted during the reply, the stop succeeds at most three minutes after the reply started. |

### Files [#files]

| Message | What to do |
| --- | --- |
| `This app has no project yet. Send the agent a prompt first, then try again.` | Wait until the agent's first reply has written the app. |
| `<path> does not exist in the app's project.` | Call `list_files` on the folder to see what is there. Paths are relative to the project root, `.`. |
| `<path> is not a file.` / `<path> is not a directory.` | Use `read_file` for files and `list_files` for folders. |
| `<path> is outside the app's project.` | Remove `..` and absolute paths; only the project can be read. |

`read_file` reads text files up to 1 MB (1,048,576 bytes); a larger file is refused with `<path> is <n> bytes, over the 1048576 bytes read_file returns.`

### Publishing [#publishing]

| Message | What to do |
| --- | --- |
| `Name the app to publish it for the first time.` | Pass `name` on the first publish. |
| `Nothing to publish yet. Send the agent a prompt first, then publish.` | Wait for the agent to write the app, then publish. |
| `This app is already publishing. Wait for it to finish, then publish again.` | Poll `get_app` until `deployment.status` is `published` or `failed`. |

When `deployment.status` ends at `failed`, `deployment.reason` says why. A
broken build is fixed by asking the agent with `send_message`, then publishing
again.

### Marketplace [#marketplace]

| Message | What to do |
| --- | --- |
| `Publish the app before sharing it to the Marketplace.` | Publish it, and wait until `deployment.status` is `published`. A first publish that failed answers this too. |
| `The site was taken down. Publish the app again to share it.` | A workspace manager or a platform admin took the site down (`get_app` shows `siteTakenDown: true`). Publish it again, wait until `deployment.status` is `published`, then list it. |
| `Wait for the app to finish publishing, then share it.` | The first publish is still `queued` or `building`. Poll `get_app` until `deployment.status` is `published`, then list it. A republish in flight does not block a listing. |
| `Only apps everyone in the workspace can open can be listed. Change who can open it under Share first.` | In App Builder, open **Share** and let everyone in the workspace, or anyone with the link, open the site. |
| `Type a category.` | Remove empty category names. |
| `Use 30 characters or fewer.` | Shorten the category. |
| `Up to 5 categories. Remove one to add another.` | Send five categories or fewer. |
| `Name each category once, up to 5 categories.` | Remove repeats, including ones that differ only in case. |

## Creating the key [#creating-the-key]

| Message | What to do |
| --- | --- |
| `A key with App Builder (MCP) needs a rate limit of at least 120 requests a minute, over a window of 60 seconds or more.` | Close **Advanced options** to get the default of 120 a minute, or set a window of 60 seconds or more with at least 2 requests a second on average. |

## Something went wrong on the server [#something-went-wrong-on-the-server]

```txt
Something went wrong on the server. Try again, and quote request <id> if it keeps failing.
```

The server failed in a way that is not your call's fault: for example, App
Builder has no model chosen in this workspace. Try again; if it keeps failing,
send the request ID to a workspace admin, who can find the cause in the
server's logs.

## Other errors from the client [#other-errors-from-the-client]

| Message | What to do |
| --- | --- |
| `MCP error -32602: Unknown tool: <name>` | The tool name is wrong; old names such as `list_threads` were renamed (see the [tool reference](https://0.0.0.0:3003/docs/features/app-builder-mcp-tools)). |
| `Invalid input: expected string, received undefined → at appId` (or similar) | An argument is missing or has the wrong type. The [tool reference](https://0.0.0.0:3003/docs/features/app-builder-mcp-tools) lists each tool's arguments. |
