Bentrix Docs
HomePricingDashboard

MCP tools: workbenches

Workbenches: made (empty, beside another, alike on measured fills, or with a book already held), renamed and deleted; their markets added, shown and removed; their days and tick model set; a record that stopped continued; a download retried.

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

bench_add_market#

Add a market to a workbench

labplan: plussince 1.0.0

Adds a market to a workbench's working set, as Market Watch's add does: downloaded when the recording does not hold it yet, the bench rebuilt from its record at the same cursor. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
symbolstringyes—The market's symbol, as the laboratory's list writes it.

MCP

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

Python

client.bench
def add_market(self, bench: str, symbol: str) -> Dict[str, Any]

JavaScript

client.bench
addMarket(args)

C#

client.Bench
public Task<JsonNode?> AddMarket(string bench, string symbol, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) AddMarket(ctx context.Context, args BenchAddMarketArgs) (any, error)

Java

client.bench
public Object addMarket(AddMarketArgs args)

C++

client.bench
Json add_market(const AddMarketArgs &args)

Julia

client.bench
add_market = (bench, symbol)

R

client$bench
`add_market` = function(bench, symbol)

Rust

client.bench()
pub fn add_market(&self, args: BenchAddMarketArgs) -> Result<Value, Error>

bench_continue_from_stop#

Continue a workbench from where its record stops

labplan: plussince 3.1.0

On a laboratory workbench whose record of trades no longer replays on its data (today's venue refuses one of its acts), goes on from just before that act: the act and every one after it are set aside, kept in the workbench's file and never deleted, the clock stands at the moment the act was made, and the workbench is rebuilt from the acts before it. Refused where the workbench's record does not stop. Answers the workbench and the moment.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—

MCP

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

Python

client.bench
def continue_from_stop(self, bench: str) -> Dict[str, Any]

JavaScript

client.bench
continueFromStop(args)

C#

client.Bench
public Task<JsonNode?> ContinueFromStop(string bench, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) ContinueFromStop(ctx context.Context, args BenchContinueFromStopArgs) (any, error)

Java

client.bench
public Object continueFromStop(ContinueFromStopArgs args)

C++

client.bench
Json continue_from_stop(const ContinueFromStopArgs &args)

Julia

client.bench
continue_from_stop = (bench)

R

client$bench
`continue_from_stop` = function(bench)

Rust

client.bench()
pub fn continue_from_stop(&self, args: BenchContinueFromStopArgs) -> Result<Value, Error>

bench_create#

Make a workbench

labplan: plussince 1.0.0

Makes a workbench beside the others of a laboratory or a real account: in a laboratory it takes its sibling's days, markets and time zone, as the rail's own + Workbench does; in a laboratory that holds none yet it makes an empty one at the sheet's defaults, its markets added from Market Watch. With commission (amount in the account's currency; per lot or million; basis round_turn or per_side) it is made as the New workbench sheet makes one with its own commission: empty, its markets from Market Watch. Does not select it. Answers the new workbench.

ArgumentTypeRequiredDefaultWhat it is
commissionobject——**Its own commission**in the account's currency — as the New workbench sheet's *Your own*. Given, the workbench is made as that sheet makes it: empty, at the sheet's account, its markets from Market Watch. Absent, it charges its laboratory's.
homestringyes—The laboratory's or the real account's uri.

MCP

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

Python

client.bench
def create(self, home: str, *, commission: Optional[CommissionArgs] = None) -> Dict[str, Any]

JavaScript

client.bench
create(args)

C#

client.Bench
public Task<JsonNode?> Create(string home, object? commission = null, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) Create(ctx context.Context, args BenchCreateArgs) (any, error)

Java

client.bench
public Object create(CreateArgs args)

C++

client.bench
Json create(const CreateArgs &args)

Julia

client.bench
create = (home; commission = nothing)

R

client$bench
`create` = function(home, commission = NULL)

Rust

client.bench()
pub fn create(&self, args: BenchCreateArgs) -> Result<Value, Error>

bench_create_alike#

Make a workbench on other spread and fills

labplan: freesince 1.14.0

Makes a workbench alike a laboratory workbench - its days, markets, account and costs - on the spread and fills given, every setting of the sheet Workbench with other spread and fills: the spread (a session band's where a tick's UTC hour falls in one, else the fixed spread, else the recorded times the multiplier; then the floor; the bid stays, the ask moves) and the fills (a fixed, random or volatility-scaled slippage against every fill that takes the market, an extra in UTC hours, a latency, a seed). Figures in each market's own points, turned into its price units at the bench's own points. Every market whose spread changes prices it as configured, never ranked. The workbench pressed must have its engine. Answers the new workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—The laboratory workbench the new one is made alike.
latency_msinteger—0A market order waits for the first tick this many milliseconds after the quote it was sent on.
seedinteger——The seed every random draw is made from; 1 when absent.
slippageobject——The slippage of every fill that takes the market (a market order, a stop, a stop-loss).
slippage_tailarray of object——Extra slippage in UTC hours.
slippage_tail[].from_hourinteger (0–255)yes—UTC hour the band starts at.
slippage_tail[].pointsnumberyes—The band's figure, in each market's own points.
slippage_tail[].to_hourinteger (0–255)yes—UTC hour it ends before; below from_hour, it wraps midnight.
spread_fixed_pointsnumber——A fixed spread for every market, in its own points.
spread_floor_pointsnumber——A spread no tick falls below, in each market's own points.
spread_multipliernumber——Every market's recorded spread times this (1 as recorded).
spread_sessionsarray of object——Session bands, each a fixed spread for its UTC hours.
spread_sessions[].from_hourinteger (0–255)yes—UTC hour the band starts at.
spread_sessions[].pointsnumberyes—The band's figure, in each market's own points.
spread_sessions[].to_hourinteger (0–255)yes—UTC hour it ends before; below from_hour, it wraps midnight.

MCP

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

Python

client.bench
def create_alike(self, bench: str, *, latency_ms: Optional[int] = None, seed: Optional[int] = None, slippage: Optional[Any] = None, slippage_tail: Optional[List[BandArgs]] = None, spread_fixed_points: Optional[float] = None, spread_floor_points: Optional[float] = None, spread_multiplier: Optional[float] = None, spread_sessions: Optional[List[BandArgs]] = None) -> Dict[str, Any]

JavaScript

client.bench
createAlike(args)

C#

client.Bench
public Task<JsonNode?> CreateAlike(string bench, long? latencyMs = null, long? seed = null, object? slippage = null, object? slippageTail = null, double? spreadFixedPoints = null, double? spreadFloorPoints = null, double? spreadMultiplier = null, object? spreadSessions = null, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) CreateAlike(ctx context.Context, args BenchCreateAlikeArgs) (any, error)

Java

client.bench
public Object createAlike(CreateAlikeArgs args)

C++

client.bench
Json create_alike(const CreateAlikeArgs &args)

Julia

client.bench
create_alike = (bench; latency_ms = nothing, seed = nothing, slippage = nothing, slippage_tail = nothing, spread_fixed_points = nothing, spread_floor_points = nothing, spread_multiplier = nothing, spread_sessions = nothing)

R

client$bench
`create_alike` = function(bench, latency_ms = NULL, seed = NULL, slippage = NULL, slippage_tail = NULL, spread_fixed_points = NULL, spread_floor_points = NULL, spread_multiplier = NULL, spread_sessions = NULL)

Rust

client.bench()
pub fn create_alike(&self, args: BenchCreateAlikeArgs) -> Result<Value, Error>

bench_create_with_book#

Make a workbench whose account already holds positions

labplan: freesince 1.18.0

Makes a workbench alike a laboratory workbench - its days, markets, account, costs, spread and fills - whose account already holds the positions given when its run begins: a book taken over, carried from an earlier run, or written down from a real account. Each enters as it stands and no money moves: its opening commission is not in this balance, its accrued swap is carried on it and booked with its close, its ticket is kept and the workbench's own tickets start above the highest. Its close is an ordinary one. The book is the workbench's for good - a rewind and a relaunch begin with it. Refused by name: a ticket not above zero or given twice, a market the workbench does not hold, two positions of one market on a netting account, a volume or price not above zero. Answers the new workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—The laboratory workbench the new one is made alike.
positionsarray of objectyes—The positions the account already holds, 1 to 1,000.
positions[].commentstring—""
positions[].magicinteger—0
positions[].price_opennumberyes—
positions[].side"buy" | "sell"yes—
positions[].slnumber—0.0Its stop-loss, 0 or absent for none.
positions[].swapnumber—0.0The swap it has accrued so far, in the account's money (negative is paid).
positions[].symbolstringyes—One of the workbench's markets.
positions[].ticketintegeryes—Its ticket, kept: a number above zero, once in the book. The workbench's own tickets start above the highest.
positions[].time_msintegeryes—When it was opened, UTC ms.
positions[].tpnumber—0.0Its take-profit, 0 or absent for none.
positions[].volumenumberyes—

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "bench_create_with_book",
    "arguments": {
      "bench": "…",
      "positions": []
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.bench
def create_with_book(self, bench: str, positions: List[HeldPositionArgs]) -> Dict[str, Any]

JavaScript

client.bench
createWithBook(args)

C#

client.Bench
public Task<JsonNode?> CreateWithBook(string bench, object positions, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) CreateWithBook(ctx context.Context, args BenchCreateWithBookArgs) (any, error)

Java

client.bench
public Object createWithBook(CreateWithBookArgs args)

C++

client.bench
Json create_with_book(const CreateWithBookArgs &args)

Julia

client.bench
create_with_book = (bench, positions)

R

client$bench
`create_with_book` = function(bench, positions)

Rust

client.bench()
pub fn create_with_book(&self, args: BenchCreateWithBookArgs) -> Result<Value, Error>

bench_delete#

Delete a workbench

labplan: plussince 1.0.0destructive

Deletes a workbench and its own record; the laboratory's recording stays. Asked without confirm it answers what would go and deletes nothing; with confirm true it deletes.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
confirmboolean—falseWithout it the answer only says what would go; with it the workbench is deleted.

MCP

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

Python

client.bench
def delete(self, bench: str, *, confirm: Optional[bool] = None) -> Dict[str, Any]

JavaScript

client.bench
delete(args)

C#

client.Bench
public Task<JsonNode?> Delete(string bench, bool? confirm = null, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) Delete(ctx context.Context, args BenchDeleteArgs) (any, error)

Java

client.bench
public Object delete(DeleteArgs args)

C++

client.bench
Json delete_(const DeleteArgs &args)

Julia

client.bench
delete = (bench; confirm = nothing)

R

client$bench
`delete` = function(bench, confirm = NULL)

Rust

client.bench()
pub fn delete(&self, args: BenchDeleteArgs) -> Result<Value, Error>

bench_fetch_rest#

Download the rest of a market

labplan: plussince 1.0.0

Downloads what a market of the workbench is missing over its days, as Market Watch's own row does. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
symbolstringyes—The market's symbol, as the laboratory's list writes it.

MCP

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

Python

client.bench
def fetch_rest(self, bench: str, symbol: str) -> Dict[str, Any]

JavaScript

client.bench
fetchRest(args)

C#

client.Bench
public Task<JsonNode?> FetchRest(string bench, string symbol, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) FetchRest(ctx context.Context, args BenchFetchRestArgs) (any, error)

Java

client.bench
public Object fetchRest(FetchRestArgs args)

C++

client.bench
Json fetch_rest(const FetchRestArgs &args)

Julia

client.bench
fetch_rest = (bench, symbol)

R

client$bench
`fetch_rest` = function(bench, symbol)

Rust

client.bench()
pub fn fetch_rest(&self, args: BenchFetchRestArgs) -> Result<Value, Error>

bench_remove_market#

Take a market off a workbench

labplan: plussince 1.0.0

Takes a market off a workbench's working set; a market already traded is only hidden, and one with an open position or order is refused, as Market Watch's own door refuses it. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
symbolstringyes—The market's symbol, as the laboratory's list writes it.

MCP

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

Python

client.bench
def remove_market(self, bench: str, symbol: str) -> Dict[str, Any]

JavaScript

client.bench
removeMarket(args)

C#

client.Bench
public Task<JsonNode?> RemoveMarket(string bench, string symbol, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) RemoveMarket(ctx context.Context, args BenchRemoveMarketArgs) (any, error)

Java

client.bench
public Object removeMarket(RemoveMarketArgs args)

C++

client.bench
Json remove_market(const RemoveMarketArgs &args)

Julia

client.bench
remove_market = (bench, symbol)

R

client$bench
`remove_market` = function(bench, symbol)

Rust

client.bench()
pub fn remove_market(&self, args: BenchRemoveMarketArgs) -> Result<Value, Error>

bench_rename#

Rename a workbench

labplan: plussince 1.0.0idempotent

Gives a workbench the name the rail shows. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
namestringyes—

MCP

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

Python

client.bench
def rename(self, bench: str, name: str) -> Dict[str, Any]

JavaScript

client.bench
rename(args)

C#

client.Bench
public Task<JsonNode?> Rename(string bench, string name, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) Rename(ctx context.Context, args BenchRenameArgs) (any, error)

Java

client.bench
public Object rename(RenameArgs args)

C++

client.bench
Json rename(const RenameArgs &args)

Julia

client.bench
rename = (bench, name)

R

client$bench
`rename` = function(bench, name)

Rust

client.bench()
pub fn rename(&self, args: BenchRenameArgs) -> Result<Value, Error>

bench_retry_market#

Ask for a market again

labplan: plussince 1.0.0

Asks again for a market whose last download failed. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
symbolstringyes—The market's symbol, as the laboratory's list writes it.

MCP

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

Python

client.bench
def retry_market(self, bench: str, symbol: str) -> Dict[str, Any]

JavaScript

client.bench
retryMarket(args)

C#

client.Bench
public Task<JsonNode?> RetryMarket(string bench, string symbol, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) RetryMarket(ctx context.Context, args BenchRetryMarketArgs) (any, error)

Java

client.bench
public Object retryMarket(RetryMarketArgs args)

C++

client.bench
Json retry_market(const RetryMarketArgs &args)

Julia

client.bench
retry_market = (bench, symbol)

R

client$bench
`retry_market` = function(bench, symbol)

Rust

client.bench()
pub fn retry_market(&self, args: BenchRetryMarketArgs) -> Result<Value, Error>

bench_set_days#

Set a workbench's days

labplan: plussince 1.0.0

Sets the days a laboratory workbench replays: free until its first fill, and only grown after it, as the Replay widget's days are. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
from_msintegeryes—The first day's start, UTC milliseconds.
to_msintegeryes—The last day's end, UTC milliseconds.

MCP

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

Python

client.bench
def set_days(self, bench: str, from_ms: int, to_ms: int) -> Dict[str, Any]

JavaScript

client.bench
setDays(args)

C#

client.Bench
public Task<JsonNode?> SetDays(string bench, long fromMs, long toMs, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) SetDays(ctx context.Context, args BenchSetDaysArgs) (any, error)

Java

client.bench
public Object setDays(SetDaysArgs args)

C++

client.bench
Json set_days(const SetDaysArgs &args)

Julia

client.bench
set_days = (bench, from_ms, to_ms)

R

client$bench
`set_days` = function(bench, from_ms, to_ms)

Rust

client.bench()
pub fn set_days(&self, args: BenchSetDaysArgs) -> Result<Value, Error>

bench_set_tick_model#

Choose a workbench's tick model

labplan: plussince 1.0.0

Chooses how a laboratory workbench's ticks are made: real ticks, every tick, 1 minute OHLC or open prices. Refused once the run has its first fill, as the modelling menu refuses it. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
modelstringyes—

MCP

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

Python

client.bench
def set_tick_model(self, bench: str, model: Literal["real_ticks", "every_tick", "ohlc_m1", "open_prices"]) -> Dict[str, Any]

JavaScript

client.bench
setTickModel(args)

C#

client.Bench
public Task<JsonNode?> SetTickModel(string bench, string model, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) SetTickModel(ctx context.Context, args BenchSetTickModelArgs) (any, error)

Java

client.bench
public Object setTickModel(SetTickModelArgs args)

C++

client.bench
Json set_tick_model(const SetTickModelArgs &args)

Julia

client.bench
set_tick_model = (bench, model)

R

client$bench
`set_tick_model` = function(bench, model)

Rust

client.bench()
pub fn set_tick_model(&self, args: BenchSetTickModelArgs) -> Result<Value, Error>

bench_show_market#

Show a hidden market again

labplan: plussince 1.0.0idempotent

Shows again a market the workbench had hidden. Answers the workbench.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—
symbolstringyes—The market's symbol, as the laboratory's list writes it.

MCP

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

Python

client.bench
def show_market(self, bench: str, symbol: str) -> Dict[str, Any]

JavaScript

client.bench
showMarket(args)

C#

client.Bench
public Task<JsonNode?> ShowMarket(string bench, string symbol, CancellationToken ct = default)

Go

client.Bench
func (a *BenchAPI) ShowMarket(ctx context.Context, args BenchShowMarketArgs) (any, error)

Java

client.bench
public Object showMarket(ShowMarketArgs args)

C++

client.bench
Json show_market(const ShowMarketArgs &args)

Julia

client.bench
show_market = (bench, symbol)

R

client$bench
`show_market` = function(bench, symbol)

Rust

client.bench()
pub fn show_market(&self, args: BenchShowMarketArgs) -> Result<Value, Error>

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