> For the complete documentation index, see [llms.txt](https://docs.tokenbot.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokenbot.com/home/api-docs/mcp/tools.md).

# Tools

The server exposes **25 tools** across five domains.

## Auth Tools

### `set_user_context`

Set the acting user for subsequent operations.

| Parameter | Type   | Required | Description                                                     |
| --------- | ------ | -------- | --------------------------------------------------------------- |
| `userId`  | string | No\*     | User ID to act as                                               |
| `apiKey`  | string | No\*     | API key (`tb_` format) — the user ID is extracted automatically |

\*One of `userId` or `apiKey` is required.

### `get_user_context`

Get the current user context. No parameters.

## Exchange Tools

| Tool                       | Description                                     |
| -------------------------- | ----------------------------------------------- |
| `list_exchanges`           | List all exchange accounts                      |
| `get_exchange`             | Get one exchange account by `id`                |
| `exchange_test`            | Validate exchange API credentials before saving |
| `exchange_add`             | Add a new exchange account                      |
| `exchange_remove`          | Remove an exchange account by `id`              |
| `list_supported_exchanges` | List exchanges the platform supports            |

## Strategy Tools

| Tool                    | Description                  |
| ----------------------- | ---------------------------- |
| `list_strategies`       | List all strategies          |
| `get_strategy`          | Get one strategy by `id`     |
| `strategy_create`       | Create a strategy            |
| `strategy_update`       | Update strategy settings     |
| `strategy_delete`       | Delete a strategy by `id`    |
| `strategy_link_copiers` | Attach copiers to a strategy |

## Copier Tools

| Tool            | Description               |
| --------------- | ------------------------- |
| `list_copiers`  | List all copiers          |
| `get_copier`    | Get one copier by `id`    |
| `copier_create` | Create a copier           |
| `copier_update` | Update copier settings    |
| `copier_start`  | Start (activate) a copier |
| `copier_stop`   | Stop (pause) a copier     |
| `copier_delete` | Delete a copier by `id`   |

## Trade Tools

| Tool                  | Description                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------- |
| `list_trades`         | List trades (filters: `strategyId`, `exchangeAccountId`, `status`, `side`, `limit`, `offset`) |
| `get_trade`           | Get one trade by `id`                                                                         |
| `get_trade_analytics` | Aggregated trade performance metrics (optional `strategyId`)                                  |
| `trade_cancel`        | Cancel a trade by `id`                                                                        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.tokenbot.com/home/api-docs/mcp/tools.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
