Bentrix Docs
HomePricingDashboard

MCP tools: model

A model Bentrix runs from the person's models folder — a Python file, or an ONNX model's folder: checked against its manifest, started on a workbench's market, paused and stopped. Which engine a model runs on is answered; the engine, its download and every tick are the person's alone.

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

model_check#

Check an ONNX model's folder

readplan: freesince 3.4.0reads only

Nothing is started.

ArgumentTypeRequiredDefaultWhat it is
filestringyes—An ONNX model's folder in the models folder.

MCP

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

Python

client.model
def check(self, file: str) -> Dict[str, Any]

JavaScript

client.model
check(args)

C#

client.Model
public Task<JsonNode?> Check(string file, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Check(ctx context.Context, args ModelCheckArgs) (any, error)

Java

client.model
public Object check(CheckArgs args)

C++

client.model
Json check(const CheckArgs &args)

Julia

client.model
check = (file)

R

client$model
`check` = function(file)

Rust

client.model()
pub fn check(&self, args: ModelCheckArgs) -> Result<Value, Error>

model_forget#

Forget a model an agent installed

adminplan: freesince 3.6.0destructive

Removes a model an agent installed from the models folder - its files and its record. A model the person put there is the person's own to delete, and is refused here.

ArgumentTypeRequiredDefaultWhat it is
namestringyes—A model's name in the models folder.

MCP

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

Python

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

JavaScript

client.model
forget(args)

C#

client.Model
public Task<JsonNode?> Forget(string name, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Forget(ctx context.Context, args ModelForgetArgs) (any, error)

Java

client.model
public Object forget(ForgetArgs args)

C++

client.model
Json forget(const ForgetArgs &args)

Julia

client.model
forget = (name)

R

client$model
`forget` = function(name)

Rust

client.model()
pub fn forget(&self, args: ModelForgetArgs) -> Result<Value, Error>

model_infer#

Run a policy once

labplan: freesince 3.6.0

Runs an ONNX model of the models folder on one input - the Gym's policy run by Bentrix (engine "bentrix") instead of the program's own runtime - consent checked, on the engine the person chose and in its host, the host kept for the next call. Answers its output values and how long it took.

ArgumentTypeRequiredDefaultWhat it is
inputarray of numberyes—The flattened observation: the model's one input, [1, n] of 32-bit floats.
namestringyes—An ONNX policy's folder in the models folder: model.onnx, no manifest needed.

MCP

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

Python

client.model
def infer(self, name: str, input: List[float]) -> Dict[str, Any]

JavaScript

client.model
infer(args)

C#

client.Model
public Task<JsonNode?> Infer(string name, IReadOnlyList<double> input, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Infer(ctx context.Context, args ModelInferArgs) (any, error)

Java

client.model
public Object infer(InferArgs args)

C++

client.model
Json infer(const InferArgs &args)

Julia

client.model
infer = (name, input)

R

client$model
`infer` = function(name, input)

Rust

client.model()
pub fn infer(&self, args: ModelInferArgs) -> Result<Value, Error>

model_info#

One model in the models folder

readplan: freesince 3.6.0reads only

ArgumentTypeRequiredDefaultWhat it is
namestringyes—A model's name in the models folder.

MCP

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

Python

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

JavaScript

client.model
info(args)

C#

client.Model
public Task<JsonNode?> Info(string name, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Info(ctx context.Context, args ModelInfoArgs) (any, error)

Java

client.model
public Object info(InfoArgs args)

C++

client.model
Json info(const InfoArgs &args)

Julia

client.model
info = (name)

R

client$model
`info` = function(name)

Rust

client.model()
pub fn info(&self, args: ModelInfoArgs) -> Result<Value, Error>

model_install#

Install a model into the models folder

adminplan: freesince 3.6.0

Writes a model into the person's models folder - an ONNX model (onnx_base64 with its manifest) or a Python model (python, its source) - where it waits for the person's tick on these exact bytes (Settings > Forecast > Models, Run it) before anything runs it; a model replaced since it was ticked waits again. A name the person's own file holds is never overwritten. Answers the model as model_list does, its consent waiting_for_the_tick.

ArgumentTypeRequiredDefaultWhat it is
manifestany——Its manifest (model_manifest), with the ONNX file.
namestringyes—The model's name in the models folder: a folder for an ONNX model, a.py name for a Python one.
onnx_base64string——An ONNX model's file, base64.
pythonstring——A Python model's source, declaring one @bentrix.model.

MCP

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

Python

client.model
def install(self, name: str, *, manifest: Optional[Any] = None, onnx_base64: Optional[str] = None, python: Optional[str] = None) -> Dict[str, Any]

JavaScript

client.model
install(args)

C#

client.Model
public Task<JsonNode?> Install(string name, object? manifest = null, string? onnxBase64 = null, string? python = null, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Install(ctx context.Context, args ModelInstallArgs) (any, error)

Java

client.model
public Object install(InstallArgs args)

C++

client.model
Json install(const InstallArgs &args)

Julia

client.model
install = (name; manifest = nothing, onnx_base64 = nothing, python = nothing)

R

client$model
`install` = function(name, manifest = NULL, onnx_base64 = NULL, python = NULL)

Rust

client.model()
pub fn install(&self, args: ModelInstallArgs) -> Result<Value, Error>

model_list#

The models in the models folder

readplan: freesince 3.6.0reads only

Every model in the person's models folder: its name, kind (onnx or python), the label its forecasts carry where the manifest says it, its hash, its consent (own - the person's file, no tick needed; waiting_for_the_tick - installed by an agent; ticked), the engine it would run on, and the ids it runs under now. Never where an engine's library is.

Takes no arguments.

MCP

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

Python

client.model
def list(self) -> Dict[str, Any]

JavaScript

client.model
list(args)

C#

client.Model
public Task<JsonNode?> List(CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) List(ctx context.Context) (any, error)

Java

client.model
public Object list()

C++

client.model
Json list()

Julia

client.model
list = ()

R

client$model
`list` = function()

Rust

client.model()
pub fn list(&self) -> Result<Value, Error>

model_pause#

Pause or resume a model

labplan: freesince 3.4.0

Pauses a running model (it is asked nothing at the closes while paused; its last forecast stays) or resumes it (paused false), as the legend row's Pause does. Answers its state.

ArgumentTypeRequiredDefaultWhat it is
modelintegeryes—
pausedboolean——For model_pause: true pauses, false resumes.

MCP

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

Python

client.model
def pause(self, model: int, *, paused: Optional[bool] = None) -> Dict[str, Any]

JavaScript

client.model
pause(args)

C#

client.Model
public Task<JsonNode?> Pause(long model, bool? paused = null, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Pause(ctx context.Context, args ModelPauseArgs) (any, error)

Java

client.model
public Object pause(PauseArgs args)

C++

client.model
Json pause(const PauseArgs &args)

Julia

client.model
pause = (model; paused = nothing)

R

client$model
`pause` = function(model, paused = NULL)

Rust

client.model()
pub fn pause(&self, args: ModelPauseArgs) -> Result<Value, Error>

model_run_once#

Run a model once at a close

labplan: freesince 3.6.0

Runs a model of the models folder once - consent checked, on the engine the person chose, in a process of its own unless the person keeps the built-in engine inside Bentrix - on the window cut at the last close of its interval at or before at_ms (the workbench's clock when omitted), and puts what it answers as its forecast - or, for a model whose manifest declares outputs (schema 2), each output as output_put puts it - authored model:<name>, stamped with the workbench's clock when it lands. The frame waits for it at most the Time cap per run. Answers the forecast's state (or the outputs put), the anchor, how long the model took and whether that was late.

ArgumentTypeRequiredDefaultWhat it is
at_msinteger——A moment at or before the workbench's clock: the model runs at the last close of its interval by then. Omitted, the clock.
benchstringyes—
namestringyes—A model's name in the models folder.
symbolstringyes—The market it forecasts, one of the workbench's.

MCP

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

Python

client.model
def run_once(self, name: str, bench: str, symbol: str, *, at_ms: Optional[int] = None) -> Dict[str, Any]

JavaScript

client.model
runOnce(args)

C#

client.Model
public Task<JsonNode?> RunOnce(string name, string bench, string symbol, long? atMs = null, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) RunOnce(ctx context.Context, args ModelRunOnceArgs) (any, error)

Java

client.model
public Object runOnce(RunOnceArgs args)

C++

client.model
Json run_once(const RunOnceArgs &args)

Julia

client.model
run_once = (name, bench, symbol; at_ms = nothing)

R

client$model
`run_once` = function(name, bench, symbol, at_ms = NULL)

Rust

client.model()
pub fn run_once(&self, args: ModelRunOnceArgs) -> Result<Value, Error>

model_start#

Run a model file on a workbench

labplan: freesince 3.4.0

Starts a model from the person's models folder - a Python file declaring one @bentrix.model, run by the person's own interpreter, or an ONNX model's folder (model_manifest), run by Bentrix's built-in engine - in a process of its own, on a workbench's market: at each close of its interval it is handed the window cut there, and what it answers is put on the chart as its forecast, stamped with the instant it came back (a slow model's forecast arrives late, as a live program's does). Only a file in the models folder starts; its process carries no Bentrix variable. Answers the model's id and state.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—The workbench whose closes the model runs at.
filestringyes—A name in the models folder: a.py declaring one @bentrix.model, or an ONNX model's folder (model.onnx beside its manifest.json, model_manifest).
symbolstringyes—The market it forecasts, one of the workbench's.

MCP

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

Python

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

JavaScript

client.model
start(args)

C#

client.Model
public Task<JsonNode?> Start(string bench, string symbol, string file, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Start(ctx context.Context, args ModelStartArgs) (any, error)

Java

client.model
public Object start(StartArgs args)

C++

client.model
Json start(const StartArgs &args)

Julia

client.model
start = (bench, symbol, file)

R

client$model
`start` = function(bench, symbol, file)

Rust

client.model()
pub fn start(&self, args: ModelStartArgs) -> Result<Value, Error>

model_stop#

Stop a model

labplan: freesince 3.4.0destructive

Ends a model's process; its forecasts already put stay on the workbench until cleared.

ArgumentTypeRequiredDefaultWhat it is
modelintegeryes—
pausedboolean——For model_pause: true pauses, false resumes.

MCP

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

Python

client.model
def stop(self, model: int, *, paused: Optional[bool] = None) -> Dict[str, Any]

JavaScript

client.model
stop(args)

C#

client.Model
public Task<JsonNode?> Stop(long model, bool? paused = null, CancellationToken ct = default)

Go

client.Model
func (a *ModelAPI) Stop(ctx context.Context, args ModelStopArgs) (any, error)

Java

client.model
public Object stop(StopArgs args)

C++

client.model
Json stop(const StopArgs &args)

Julia

client.model
stop = (model; paused = nothing)

R

client$model
`stop` = function(model, paused = NULL)

Rust

client.model()
pub fn stop(&self, args: ModelStopArgs) -> Result<Value, Error>

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