> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://platform.bctrl.ai/_mcp/server.

# MCP Examples

> Discover operations, run Agents, call BCTRL Tools, and inspect Runs through MCP.

The examples below show MCP tool inputs. Your client chooses the MCP tool and
sends the displayed JSON object.

## Discover an operation

Search by outcome:

```text
bctrl_search_api
```

```json
{
  "query": "create agent conversation"
}
```

Then inspect the exact operation:

```text
bctrl_get_operation
```

```json
{
  "operationId": "conversations.create"
}
```

## Start an Agent conversation

Agents attach to an existing Runtime:

```text
bctrl_conversations_create
```

```json
{
  "body": {
    "runtimeId": "rt_AAAAAAAAAAAAAAAAAAAAAA",
    "title": "Collect the monthly report"
  }
}
```

Send another message to the ongoing conversation:

```text
bctrl_conversations_messages_create
```

```json
{
  "pathParams": {
    "conversationId": "conv_AAAAAAAAAAAAAAAAAAAAAA"
  },
  "body": {
    "text": "Open the report and export it as CSV"
  }
}
```

## Call a BCTRL Tool synchronously

`bctrl_tools_call` is the MCP operation tool. `stagehand.act` is the BCTRL Tool
being invoked:

```text
bctrl_tools_call
```

```json
{
  "pathParams": {
    "toolRef": "stagehand.act"
  },
  "headers": {
    "BCTRL-Runtime-Id": "rt_AAAAAAAAAAAAAAAAAAAAAA"
  },
  "body": {
    "instruction": "Click Continue"
  }
}
```

## Create a durable ToolCall

Use durable execution for asynchronous work or capabilities that may require
input:

```text
bctrl_tools_calls_create
```

```json
{
  "pathParams": {
    "toolRef": "captcha.solve"
  },
  "headers": {
    "BCTRL-Runtime-Id": "rt_AAAAAAAAAAAAAAAAAAAAAA"
  },
  "body": {
  }
}
```

Read the returned ToolCall:

```text
bctrl_tool_calls_get
```

```json
{
  "pathParams": {
    "toolCallId": "tc_AAAAAAAAAAAAAAAAAAAAAA"
  }
}
```

If its status is `requires_input`, inspect `prompt` and `responseSchema`, then
reply through `bctrl_tool_calls_respond`.

## Inspect one unified Run trace

Agent turns, BCTRL Tool calls, human input, and direct browser automation are
correlated under the Run:

```text
bctrl_runs_trace_list
```

```json
{
  "pathParams": {
    "runId": "run_AAAAAAAAAAAAAAAAAAAAAA"
  }
}
```

Use `bctrl_runs_events_list` for the raw event record and `bctrl_runs_stream`
for bounded live SSE collection.