MCP Examples

View as Markdown

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:

bctrl_search_api
1{
2 "query": "create agent conversation"
3}

Then inspect the exact operation:

bctrl_get_operation
1{
2 "operationId": "conversations.create"
3}

Start an Agent conversation

Agents attach to an existing Runtime:

bctrl_conversations_create
1{
2 "body": {
3 "runtimeId": "rt_AAAAAAAAAAAAAAAAAAAAAA",
4 "title": "Collect the monthly report"
5 }
6}

Send another message to the ongoing conversation:

bctrl_conversations_messages_create
1{
2 "pathParams": {
3 "conversationId": "conv_AAAAAAAAAAAAAAAAAAAAAA"
4 },
5 "body": {
6 "text": "Open the report and export it as CSV"
7 }
8}

Call a BCTRL Tool synchronously

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

bctrl_tools_call
1{
2 "pathParams": {
3 "toolRef": "stagehand.act"
4 },
5 "headers": {
6 "BCTRL-Runtime-Id": "rt_AAAAAAAAAAAAAAAAAAAAAA"
7 },
8 "body": {
9 "instruction": "Click Continue"
10 }
11}

Create a durable ToolCall

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

bctrl_tools_calls_create
1{
2 "pathParams": {
3 "toolRef": "captcha.solve"
4 },
5 "headers": {
6 "BCTRL-Runtime-Id": "rt_AAAAAAAAAAAAAAAAAAAAAA"
7 },
8 "body": {
9 }
10}

Read the returned ToolCall:

bctrl_tool_calls_get
1{
2 "pathParams": {
3 "toolCallId": "tc_AAAAAAAAAAAAAAAAAAAAAA"
4 }
5}

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:

bctrl_runs_trace_list
1{
2 "pathParams": {
3 "runId": "run_AAAAAAAAAAAAAAAAAAAAAA"
4 }
5}

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