Skip to content

Model tools of the MCP server ​

The 10 tools that work on models and trainings. How to connect, and how results and errors come back, is in Connecting a client.

Reading ​

model_list ​

Lists models, newest first, as summaries: id, dataset and its name, task, service, status, stop reason, dates, training time, description, exported formats, images per division and the main metrics.

ParameterTypeRequiredMeaning
limitinteger, 1 to 100noDefault 20
datasetIdstringnoOnly the models of this dataset
statusstringnoOnly models in this status, for example finished, training, failed or cancelled
recentbooleannoAccepted for compatibility. It has no effect

model_get ​

Returns the stored record of a model.

ParameterTypeRequiredMeaning
modelIdstringyes
summarybooleannoLeave out the heavy parts: the logs, the confusion matrices, the detailed metric tables, the training configuration and the file locations. Ignored when fields is given
fieldsarray of stringsnoReturn only these top-level fields

A full model record is large. Ask for summary: true or for fields unless the logs or the matrices are needed.

model_metrics ​

The metrics of a model with its confusion matrices, its classes, its data division, its status and its training time.

ParameterTypeRequired
modelIdstringyes

model_evaluation_images ​

The images the model was evaluated on, each with its subset, its confusion-matrix cells and a download URL. Returns total, count and images, sorted by subset and name.

ParameterTypeRequiredMeaning
modelIdstringyes
subsetvalidation or testnoOnly this subset
includeResultsbooleannoAdd the inference results of each image in results. They are large
urlsbooleannoWork out the download URL of the images that have none stored. Default true. The URL is false when the file cannot be found
limitinteger, 1 to 500noDefault 500

model_training_log ​

The log of a training, from one of three sources.

ParameterTypeRequiredMeaning
modelIdstringyes
sourceepochs, debug or remotenoDefault epochs
limitinteger, 1 to 2000noepochs and debug: return only the last entries. remote: page size, default 500
pageTokenstringnoremote only: continue from a previous page
sincestringnoremote only: ISO timestamp to start from
sourceWhat it returns
epochsThe metrics of each epoch, stored with the model
debugThe curated debug log, stored with the model
remoteCloud only. The full output of the training, read page by page from the training service

model_validate_to_train ​

Checks whether a dataset can be trained: minimum numbers of images and tags, and the divisions when the method is labeled. Returns whether it is valid, the errors, the warnings, the count per tag and the number of training images. Among other things it checks that a classification dataset has at least 2 classes, that each tag has at least 10 images or 10 annotations and, with labeled, that test and validation have at least one image each.

ParameterTypeRequiredMeaning
datasetIdstringyes
tagIdsarray of stringsnoTags to train on. Default: every tag except unclassified
methodauto or labelednoauto (default): random split. labeled: use the division each image already has

Training ​

model_train ​

Cloud only. Launches a training. The dataset is validated first, as model_validate_to_train does, and the call fails with the errors if it is not ready. Returns modelId, the warnings, the number of training images and the images per division.

ParameterTypeRequiredMeaning
datasetIdstringyes
modelNamestringyesBecomes the id of the model. The call fails if a model with that id exists
tagIdsarray of stringsnoTags to train on. Default: every tag except unclassified
methodauto or labelednoauto (default): random split with dataDivision. labeled: use the division each image already has
dataDivisionobjectnoauto only: percentages { "train": 80, "validation": 10, "test": 10 }, which is the default
saveSetbooleannoauto only: write the resulting division on the images
advancedSettingsobjectnoAdvanced training settings, as the application sends them
emailsarray of stringsnoAddresses to notify

The call returns once the training is accepted, not when it ends. Follow it with model_get or model_training_log.

model_stop_training ​

Cloud only. Cancels a training that is running. If the training service cannot cancel it, the error gives the reason.

ParameterTypeRequired
modelIdstringyes

Sharing and deleting ​

Cloud only. Creates a share token for the results of a model, or reads the results behind an existing token. The answer of the HTTP route comes in data: for a new token, token and expiresAt. If both modelId and token are sent, token is used.

ParameterTypeRequiredMeaning
modelIdstringone of the twoCreate a link for this model
expiresInstringnoWith modelId: a number followed by h or d, or never. Default 7d
tokenstringone of the twoRead the results behind this token instead of creating a link

Anyone who has the token can read the results without signing in: see Create a share link.

model_delete ​

Destructive. Deletes a model with its evaluation results and its share links. Returns the counters of what was deleted.

ParameterTypeRequired
modelIdstringyes
confirmbooleanyes, true

A model that is waiting to train or training cannot be deleted: stop it first with model_stop_training.