Skip to content

Model registry

The model registry keeps machine learning models and their versions in a project. model_registry.download fetches one file of a model version, for inference, evaluation or a build. Publishing and deleting model versions are not actions of this server.

  • “Download model.onnx from version 3 of the classifier model in project 42”
  • Dynamic, the default surface: call gitlab_execute_action with action set to the action’s ID, such as model_registry.download, and its parameters in params. gitlab_find_action finds an ID from a description of the task.
  • Meta (GITLAB_MCP_TOOL_SURFACE=meta): call gitlab_model_registry with action set to the action’s name, such as download, and its parameters in params.
  • Individual (GITLAB_MCP_TOOL_SURFACE=individual): call the action’s own tool, such as gitlab_download_ml_model_package, with its parameters as the arguments.

Every tier serves the whole group, on self-managed instances and on GitLab.com alike.

Read-only actions: 1 of 1, the ones a deployment in read-only mode keeps. A token with read_api and not api is served 1 of the 1.

The description of each action, and of each of its parameters, is the text the server serves for it on the default surface, quoted as served. The token lines say what GitLab 19.4.1 requires of a token for the requests each action sends; on an instance with Admin Mode turned on, an action only an administrator may run also needs admin_mode.

ActionIndividual
model_registry.downloadgitlab_download_ml_model_package

Download one artifact file from a project ML model registry package version by project, model version, path (empty for a file at the package root), and filename. Returns: the artifact bytes base64-encoded in content_base64, plus project, model version, path, filename, and decoded size_bytes. See also: package.list, release.link_create, repository.raw_blob.

  • Meta-tool: gitlab_model_registry, action download
  • Individual tool: gitlab_download_ml_model_package
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Model Version: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
filenamestringyesName of the file to download
model_version_idstring/integeryesModel version ID. Either the numeric version ID from the model version URL or a candidate run ID prefixed with candidate: such as candidate:5
project_idstring/integeryesProject ID or URL-encoded path
pathstringnoDirectory of the file within the model package (such as models or sub/dir). Leave it empty or pass . for a file at the package root