Bentrix Docs
HomePricingDashboard

MCP tools: laboratories

Laboratories: made over a data source, over generated markets or over the person's own files; deleted; an orphaned recording restored; an older laboratory's workbenches adopted; the data a workbench stands on.

Reached from a connected client as client.laboratory in Python, client.laboratory in JavaScript, client.laboratory() in Rust — each tool below shows its call in every language.

bench_data#

Keep or move a workbench's data

labplan: freesince 2.1.0

A workbench of a laboratory of the person's own files whose data a later import rewrote, as its card does: state says which imports changed its data and on how many days; keep keeps its data and puts the card away; move rebuilds it from its record over the new data and says what changed (deals filled at another price, deals no longer made, the balance before and after); keep_move keeps the move; undo puts the workbench back on its own data.

ArgumentTypeRequiredDefaultWhat it is
actionstring——State (the default), keep, move, keep_move or undo.
workbenchstringyes—A laboratory workbench, as a bentrix://bench/... Uri.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "bench_data",
    "arguments": {
      "workbench": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def bench_data(self, workbench: str, *, action: Optional[str] = None) -> Dict[str, Any]

JavaScript

client.laboratory
benchData(args)

C#

client.Laboratory
public Task<JsonNode?> BenchData(string workbench, string? action = null, CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) BenchData(ctx context.Context, args LaboratoryBenchDataArgs) (any, error)

Java

client.laboratory
public Object benchData(BenchDataArgs args)

C++

client.laboratory
Json bench_data(const BenchDataArgs &args)

Julia

client.laboratory
bench_data = (workbench; action = nothing)

R

client$laboratory
`bench_data` = function(workbench, action = NULL)

Rust

client.laboratory()
pub fn bench_data(&self, args: LaboratoryBenchDataArgs) -> Result<Value, Error>

generated_lab_create#

Make the laboratory of generated markets

labplan: freesince 2.1.0idempotent

Makes the one laboratory of markets made from a recipe and a seed, as the Sources sheet's Generated markets card does, or answers it where it exists already: there is one, so a program run twice, or after another, finds it here. Answers the laboratory and made (false when it was there).

Takes no arguments.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "generated_lab_create",
    "arguments": {},
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def generated_lab_create(self) -> Dict[str, Any]

JavaScript

client.laboratory
generatedLabCreate(args)

C#

client.Laboratory
public Task<JsonNode?> GeneratedLabCreate(CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) GeneratedLabCreate(ctx context.Context) (any, error)

Java

client.laboratory
public Object generatedLabCreate()

C++

client.laboratory
Json generated_lab_create()

Julia

client.laboratory
generated_lab_create = ()

R

client$laboratory
`generated_lab_create` = function()

Rust

client.laboratory()
pub fn generated_lab_create(&self) -> Result<Value, Error>

import_lab_create#

Make a laboratory of the person's own files

labplan: freesince 2.1.0

Makes a laboratory of the person's own market data files under a name, as the Sources sheet's card of the person's own files does: empty until a file is imported into it (import_run). There may be many. Answers the laboratory; bench_create makes its workbenches.

ArgumentTypeRequiredDefaultWhat it is
labelstringyes—The laboratory's name, as the person would type it on the Sources sheet.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "import_lab_create",
    "arguments": {
      "label": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def import_lab_create(self, label: str) -> Dict[str, Any]

JavaScript

client.laboratory
importLabCreate(args)

C#

client.Laboratory
public Task<JsonNode?> ImportLabCreate(string label, CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) ImportLabCreate(ctx context.Context, args LaboratoryImportLabCreateArgs) (any, error)

Java

client.laboratory
public Object importLabCreate(ImportLabCreateArgs args)

C++

client.laboratory
Json import_lab_create(const ImportLabCreateArgs &args)

Julia

client.laboratory
import_lab_create = (label)

R

client$laboratory
`import_lab_create` = function(label)

Rust

client.laboratory()
pub fn import_lab_create(&self, args: LaboratoryImportLabCreateArgs) -> Result<Value, Error>

lab_adopt#

Answer the one-time adoption

adminplan: freesince 1.0.0

When Bentrix offers once to move an older laboratory's workbenches into the laboratory of the same history, answers it as the offer's own buttons do: keep_both keeps them apart, else they move. Refused when nothing is offered.

ArgumentTypeRequiredDefaultWhat it is
keep_bothbooleanyes—Keep the two apart rather than move the older one's workbenches into the newer.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lab_adopt",
    "arguments": {
      "keep_both": true
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def lab_adopt(self, keep_both: bool) -> Dict[str, Any]

JavaScript

client.laboratory
labAdopt(args)

C#

client.Laboratory
public Task<JsonNode?> LabAdopt(bool keepBoth, CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) LabAdopt(ctx context.Context, args LaboratoryLabAdoptArgs) (any, error)

Java

client.laboratory
public Object labAdopt(LabAdoptArgs args)

C++

client.laboratory
Json lab_adopt(const LabAdoptArgs &args)

Julia

client.laboratory
lab_adopt = (keep_both)

R

client$laboratory
`lab_adopt` = function(keep_both)

Rust

client.laboratory()
pub fn lab_adopt(&self, args: LaboratoryLabAdoptArgs) -> Result<Value, Error>

lab_create#

Make a laboratory

labplan: freesince 1.0.0

Makes a laboratory over a data source this edition carries (source, a token from bentrix://sources; the first when omitted) and its first, empty workbench, as the New laboratory sheet's Create does: the account's currency (USD, EUR, GBP, JPY, CHF; over the crypto exchange USDT, USDC, EUR, JPY), opening balance, leverage, hedging or netting and time zone are fixed at birth. Its markets come from Market Watch and its days from the Replay widget. Answers the laboratory and the workbench.

ArgumentTypeRequiredDefaultWhat it is
currencystring——The account's currency: USD, EUR, GBP, JPY or CHF; over the crypto exchange (the crypto exchange) USDT, USDC, EUR or JPY.
leveragenumber——The leverage, 1 to the venue's ceiling (100 is 1:100).
margin_modestring——Hedging or netting.
namestring——The first workbench's name; a generated one when omitted.
opening_balancenumber——What the workbench's account opens on, in its currency.
sourcestring——**The recording the laboratory is over**by its token — one of the sources this edition carries (bentrix://sources); the first of them when omitted. A source this edition does not carry is refused: its laboratory found on disk replays, and no new one is made.
time_zonestring——A time zone's code, as the sheet offers them (UTC by default).

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lab_create",
    "arguments": {},
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def lab_create(self, *, currency: Optional[str] = None, leverage: Optional[float] = None, margin_mode: Optional[str] = None, name: Optional[str] = None, opening_balance: Optional[float] = None, source: Optional[str] = None, time_zone: Optional[str] = None) -> Dict[str, Any]

JavaScript

client.laboratory
labCreate(args)

C#

client.Laboratory
public Task<JsonNode?> LabCreate(string? currency = null, double? leverage = null, string? marginMode = null, string? name = null, double? openingBalance = null, string? source = null, string? timeZone = null, CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) LabCreate(ctx context.Context, args LaboratoryLabCreateArgs) (any, error)

Java

client.laboratory
public Object labCreate(LabCreateArgs args)

C++

client.laboratory
Json lab_create(const LabCreateArgs &args)

Julia

client.laboratory
lab_create = (; currency = nothing, leverage = nothing, margin_mode = nothing, name = nothing, opening_balance = nothing, source = nothing, time_zone = nothing)

R

client$laboratory
`lab_create` = function(currency = NULL, leverage = NULL, margin_mode = NULL, name = NULL, opening_balance = NULL, source = NULL, time_zone = NULL)

Rust

client.laboratory()
pub fn lab_create(&self, args: LaboratoryLabCreateArgs) -> Result<Value, Error>

lab_delete#

Ask the person to delete a laboratory

adminplan: freesince 1.0.0destructivelong work: answers a job

Opens Bentrix's own delete sheet for a laboratory, the one that names what goes - its recording's data - and what stays; the person deletes it or keeps it. Answers a job: completed when it is gone, failed when the person kept it.

ArgumentTypeRequiredDefaultWhat it is
labstringyes—The laboratory's uri, as get_state gives it.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lab_delete",
    "arguments": {
      "lab": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def lab_delete(self, lab: str) -> _Job[Dict[str, Any]]

JavaScript

client.laboratory
labDelete(args)

C#

client.Laboratory
public Task<Job> LabDelete(string lab, CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) LabDelete(ctx context.Context, args LaboratoryLabDeleteArgs) (*Job, error)

Java

client.laboratory
public Job labDelete(LabDeleteArgs args)

C++

client.laboratory
Job lab_delete(const LabDeleteArgs &args)

Julia

client.laboratory
lab_delete = (lab)

R

client$laboratory
`lab_delete` = function(lab)

Rust

client.laboratory()
pub fn lab_delete(&self, args: LaboratoryLabDeleteArgs) -> Result<Job<'a>, Error>

lab_restore_orphan#

Restore, move or remove a laboratory the list does not name

adminplan: freesince 1.0.0

Restore puts an orphan whose recording has no laboratory back on the list, as its row's restore does, at once. Move (its workbenches into the laboratory its recording already has) and remove (its workbenches lost) ask the person on its row; answers a job for those.

ArgumentTypeRequiredDefaultWhat it is
actionstringyes—Restore, move or remove - as its row offers.
orphanstringyes—The orphan's uri, as orphans_list gives it.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lab_restore_orphan",
    "arguments": {
      "action": "…",
      "orphan": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def lab_restore_orphan(self, orphan: str, action: str) -> Dict[str, Any]

JavaScript

client.laboratory
labRestoreOrphan(args)

C#

client.Laboratory
public Task<JsonNode?> LabRestoreOrphan(string orphan, string action, CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) LabRestoreOrphan(ctx context.Context, args LaboratoryLabRestoreOrphanArgs) (any, error)

Java

client.laboratory
public Object labRestoreOrphan(LabRestoreOrphanArgs args)

C++

client.laboratory
Json lab_restore_orphan(const LabRestoreOrphanArgs &args)

Julia

client.laboratory
lab_restore_orphan = (orphan, action)

R

client$laboratory
`lab_restore_orphan` = function(orphan, action)

Rust

client.laboratory()
pub fn lab_restore_orphan(&self, args: LaboratoryLabRestoreOrphanArgs) -> Result<Value, Error>

orphans_list#

Read the laboratories the list does not name

readplan: freesince 1.0.0reads only

Answers each laboratory on disk that the workspace's list does not name - its uri, how many of its workbenches read, its own words when it does not read, the laboratory its recording already has and what can be done with it (restore, or move and remove) - and whether a one-time adoption is offered.

Takes no arguments.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "orphans_list",
    "arguments": {},
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.laboratory
def orphans_list(self) -> Dict[str, Any]

JavaScript

client.laboratory
orphansList(args)

C#

client.Laboratory
public Task<JsonNode?> OrphansList(CancellationToken ct = default)

Go

client.Laboratory
func (a *LaboratoryAPI) OrphansList(ctx context.Context) (any, error)

Java

client.laboratory
public Object orphansList()

C++

client.laboratory
Json orphans_list()

Julia

client.laboratory
orphans_list = ()

R

client$laboratory
`orphans_list` = function()

Rust

client.laboratory()
pub fn orphans_list(&self) -> Result<Value, Error>

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed