Skip to navigation

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
{
"query": "create agent conversation"
}

Then inspect the exact operation:

bctrl_get_operation
{
"operationId": "conversations.create"
}

Start an Agent conversation

Agents attach to an existing Runtime:

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

Send another message to the ongoing conversation:

bctrl_conversations_messages_create
{
"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:

bctrl_tools_call
{
"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:

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

Read the returned ToolCall:

bctrl_tool_calls_get
{
"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:

bctrl_runs_trace_list
{
"pathParams": {
"runId": "run_AAAAAAAAAAAAAAAAAAAAAA"
}
}

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