Package
gitlab_packageManage GitLab package and container registries: publish, download, list, delete generic packages; browse container images and tags; configure package and container registry protection rules.
Instructions
Example: {"action":"delete","params":{...}} For the params schema of any action, read the MCP resource gitlab://schema/meta/gitlab_package/.
Manage GitLab package registry, container registry, and protection rules. Upload/download generic packages, list/delete packages, browse container images/tags, and configure access policies. Delete actions are destructive. When to use: publish / download / list / delete generic packages, browse npm/maven/conan/nuget/pypi/etc. metadata, browse and prune container images and tags, manage container and package protection rules. NOT for: release asset links — these are managed by gitlab_release link_; secure files (use gitlab_admin secure_file_); ML model registry artifacts (use gitlab_model_registry); upload general project attachments (use gitlab_project upload).
Behavior:
Idempotent reads: list / file_list / registry_list_project / registry_list_group / registry_get / registry_tag_list / registry_tag_get / registry_rule_list / protection_rule_list / download.
publish / publish_directory / publish_and_link create a NEW package version (NON-idempotent — re-publishing the same (package_name, package_version, file_name) returns 400/409 or creates a duplicate file depending on package_type). registry_rule_update / protection_rule_update are idempotent; *_create are non-idempotent on duplicate keys.
Side effects: publish_and_link also creates a release link visible to release subscribers; download streams large files to disk when output_path is set; protection_rule_create / registry_rule_create take effect immediately and may block subsequent publish/delete calls.
Destructive: delete (entire package), file_delete (single file), registry_delete (entire image repo), registry_tag_delete / registry_tag_delete_bulk (image tags — name_regex_delete may match many tags) and *_rule_delete are irreversible. Protection rules can return 403 ('forbidden by protection rule') instead of executing the delete.
Returns:
list / file_list / registry_list_project / registry_list_group / registry_tag_list / registry_rule_list / protection_rule_list: arrays with pagination.
publish / publish_and_link / publish_directory / registry_get / registry_tag_get / registry_rule_create / registry_rule_update / protection_rule_create / protection_rule_update: package / image / rule object. publish_and_link also returns the created release link.
download: {file_name, content_base64 (or saved_to)} — large files are streamed to disk when output_path is set.
delete / file_delete / registry_delete / registry_tag_delete / registry_tag_delete_bulk / registry_rule_delete / protection_rule_delete: {success, message}. Errors: 404 (hint: package_id, repository_id and tag_name are project-scoped), 403 (hint: requires Maintainer+ to delete; protection rules may block delete with a 'forbidden by protection rule' message), 400 (hint: file_path must exist locally; content_base64 must be valid base64; package_type must be one of GitLab's supported types).
Param conventions: * = required. Most actions need project_id*. List actions accept page, per_page.
Packages:
publish: project_id*, package_name*, package_version*, file_name*, file_path or content_base64 (one required), status (default/hidden)
download: project_id*, package_name*, package_version*, file_name*, output_path*
list: project_id*, package_name, package_version, package_type (generic/npm/maven/etc.), order_by, sort
file_list: project_id*, package_id*
delete: project_id*, package_id*. Deletes package and all files.
file_delete: project_id*, package_id*, package_file_id*
publish_and_link: publish + create release link. project_id*, package_name*, package_version*, file_name*, file_path or content_base64 (one required), tag_name*, link_name, link_type
publish_directory: project_id*, package_name*, package_version*, directory_path*, include_pattern (glob), status
Container registry:
registry_list_project: project_id*, tags, tags_count
registry_list_group: group_id*
registry_get: repository_id*, tags, tags_count
registry_delete: project_id*, repository_id*
registry_tag_list / registry_tag_get / registry_tag_delete: project_id*, repository_id*, tag_name* (for get/delete)
registry_tag_delete_bulk: project_id*, repository_id*, name_regex_delete, name_regex_keep, keep_n, older_than
Container registry protection rules:
registry_rule_list: project_id*
registry_rule_create: project_id*, repository_path_pattern*, minimum_access_level_for_push, minimum_access_level_for_delete
registry_rule_update: project_id*, rule_id*, repository_path_pattern, minimum_access_level_for_push, minimum_access_level_for_delete
registry_rule_delete: project_id*, rule_id*
Package protection rules:
protection_rule_list: project_id*
protection_rule_create: project_id*, package_name_pattern*, package_type*, minimum_access_level_for_push, minimum_access_level_for_delete
protection_rule_update: project_id*, rule_id*, package_name_pattern, package_type, minimum_access_level_for_push, minimum_access_level_for_delete
protection_rule_delete: project_id*, rule_id*
See also: gitlab_release (release asset links), gitlab_project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform. Pick exactly one of the values in `enum`. Each action expects its own `params` object — see the tool description for the per-action parameter list. | |
| params | No | Action-specific parameters as a JSON object. Required and optional fields differ per action; consult this tool's description for the chosen action. Send only the fields documented for that action — unknown keys are rejected with a validation error (only reserved meta keys like `confirm` are stripped before validation). For the JSON Schema of a specific action's `params`, read the MCP resource `gitlab://schema/meta/{tool}/{action}` (replace placeholders with the tool name and the chosen action). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next_steps | No | Optional. Suggested follow-up actions or tool calls for the LLM, contextual to the result. | |
| pagination | No | Present on list actions. Use `has_more` and `next_page` to paginate through results. |