---
title: Tool reference
description: Every tool the AINOX App MCP server exposes, with its inputs, its result, and the errors it returns.
---

Every tool acts on the threads owned by the API key's account. A `threadId` that doesn't exist, or belongs to someone else, fails with `Thread <id> not found.` Results come back as `structuredContent`; a failed call sets `isError`, and `content[0].text` holds a JSON string with the error in its `message` field.

## list_threads

Lists your 50 most recently updated threads, newest first. Takes no input.

There is no paging, but every other tool still takes an older thread's ID. It's the last part of the thread's web app URL, `/chat/<threadId>`.

- **`threads`** · `object[]` · required

  **properties**

  - **`id`** · `string` · required

    Thread ID.

  - **`title`** · `string` · required

    Thread title.

  - **`updatedAt`** · `string` · required

    ISO 8601 time of the last update.

  - **`deploymentId`** · `string`

    Present once the thread's app has been published.

## get_thread

Gets one thread's state: whether the agent is working, what it's waiting on, and the deployment.

- **`threadId`** · body · `string` · required

  Thread ID (a UUID) from `list_threads` or `create_thread`.

- **`id`** · `string` · required

  Thread ID.

- **`title`** · `string` · required

  Thread title.

- **`updatedAt`** · `string` · required

  ISO 8601 time of the last update.

- **`url`** · `string`

  Link to the thread in the web app. Missing when the server has no public URL configured.

- **`status`** · `"idle" \| "running" \| "waiting"` · required

  `running` while the agent replies, `waiting` while it is paused on a tool call, `idle` when it is ready for `send_message`.

- **`pendingToolCalls`** · `object[]` · required

  Tool calls waiting on you. Empty unless `status` is `waiting`.

  **properties**

  - **`runId`** · `string` · required

    Send back to `resolve_tool_call`.

  - **`toolCallId`** · `string` · required

    Send back to `resolve_tool_call`.

  - **`toolName`** · `string` · required

    The tool the agent called, such as `ask_user`.

  - **`kind`** · `"answers" \| "approval"` · required

    Whether to answer questions or approve the call.

  - **`input`** · `unknown` · required

    The questions, for `answers`, or the command and arguments to judge, for `approval`.

- **`deployment`** · `object`

  Present once the thread has been published.

  **properties**

  - **`id`** · `string` · required

    Deployment ID.

  - **`url`** · `string` · required

    The app's public URL.

  - **`status`** · `string` · required

    `cloning`, `uploading`, `waiting`, `active`, `completed`, `failed`, or `unreachable`. See [Deployment status](/mcp/workflow#deployment-status).

## create_thread

Starts a new thread. The agent begins building in its own sandbox and the call returns immediately.

- **`prompt`** · body · `string` · required

  What to build, in plain language.

- **`threadId`** · `string` · required

  The new thread's ID.

- **`runId`** · `string` · required

  ID of the agent's run.

- **`url`** · `string`

  Link to the thread in the web app.

## send_message

Sends a follow-up prompt to an idle thread and returns immediately.

- **`threadId`** · body · `string` · required

  Thread ID.

- **`prompt`** · body · `string` · required

  What to build or change.

- **`runId`** · `string` · required

  ID of the agent's run.

Fails with `The agent is still replying` while the thread is `running`, and with `The agent is waiting on a tool call` while it is `waiting`.

## list_messages

Reads a thread's conversation, oldest first. Tool inputs and outputs are left out; read the code with `list_files` and `read_file`.

- **`threadId`** · body · `string` · required

  Thread ID.

- **`messages`** · `object[]` · required

  **properties**

  - **`id`** · `string` · required

    Message ID.

  - **`role`** · `"system" \| "user" \| "assistant"` · required

    Who wrote it.

  - **`text`** · `string` · required

    The message's text.

  - **`toolCalls`** · `object[]` · required

    The tools the agent called in this message, each with `toolName` and its `state`, such as `output-available`.

## resolve_tool_call

Answers a tool call listed in `pendingToolCalls` and resumes the run.

- **`threadId`** · body · `string` · required

  Thread ID.

- **`runId`** · body · `string` · required

  From the pending tool call.

- **`toolCallId`** · body · `string` · required

  From the pending tool call.

- **`action`** · body · `"approve" \| "decline" \| "answer"` · required

  `answer` for `kind: "answers"`; `approve` or `decline` for `kind: "approval"`.

- **`answers`** · body · `object`

  Required with `answer`. Keyed by question ID: an option label for `single_select`, an array of labels for `multi_select`, text for `text`, or `null` to skip a question that isn't required.

- **`reason`** · body · `string`

  With `decline`, why you declined. The agent reads it.

- **`runId`** · `string` · required

  ID of the resumed run.

Fails with `No pending tool call with that runId and toolCallId` when the call was already answered or the IDs are wrong; call `get_thread` for the current ones.

## stop_run

Stops the agent's reply. A tool call it is waiting on stays pending.

- **`threadId`** · body · `string` · required

  Thread ID.

- **`stopped`** · `boolean` · required

  `false` when nothing was running.

## list_files

Lists one directory of the thread's project. Wakes the thread's sandbox if it has stopped, so the first call after a while can be slow.

- **`threadId`** · body · `string` · required

  Thread ID.

- **`path`** · body · `string` · default `.`

  Directory, relative to the project root.

- **`entries`** · `object[]` · required

  Each entry has a `name` and a `type` of `file` or `directory`.

## read_file

Reads one text file of the thread's project. Wakes the sandbox if it has stopped. The file is decoded as UTF-8, so a binary file such as an image comes back garbled.

- **`threadId`** · body · `string` · required

  Thread ID.

- **`path`** · body · `string` · required

  File path, relative to the project root.

- **`content`** · `string` · required

  The file's contents, as UTF-8 text.

## publish

Publishes the thread's app to its public URL. The build runs after the call returns; poll `get_thread` for `deployment.status`. Later publishes update the same deployment.

- **`threadId`** · body · `string` · required

  Thread ID.

- **`name`** · body · `string`

  Required on the first publish and ignored after. Up to 100 characters. It becomes the thread's title and, as a lowercase slug of letters, digits, and hyphens, the URL's subdomain: `My App` publishes to `https://my-app.app-builder.poring.arkcube.com`, or `https://my-app-2.app-builder.poring.arkcube.com` when that is taken. A name with no Latin letters or digits publishes to a random address.

- **`deploymentId`** · `string` · required

  Deployment ID.

- **`url`** · `string` · required

  The app's public URL.

Fails with `Name the app before publishing it` when the first publish has no `name`, and with `Nothing to publish yet` when the thread has no files. Don't call it again while a build is in progress.
