Skip to main content
Glama

Package

gitlab_package
Destructive

Manage 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

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction 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.
paramsNoAction-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

TableJSON Schema
NameRequiredDescriptionDefault
next_stepsNoOptional. Suggested follow-up actions or tool calls for the LLM, contextual to the result.
paginationNoPresent on list actions. Use `has_more` and `next_page` to paginate through results.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Details idempotent vs non-idempotent actions, side effects (e.g., publish_and_link creates release link), destructive irreversible actions, and common errors with hints. Annotations provide destructiveHint but description adds specifics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with example at top, usage guidelines, behavior, returns, errors, param conventions, and detailed action lists. Front-loaded with most important info. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers behavior for all 24 actions, return types, error hints, parameter conventions. Existence of output schema noted. References MCP resource for further schema detail. Complete for a multi-action tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema has only 2 params, description lists per-action parameters in detail (required, optional, conventions). Schema coverage 100% but description is the primary source for action-specific params.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states tool manages GitLab package registry, container registry, and protection rules. Lists specific actions (upload/download, list/delete, browse, configure) and differentiates from sibling tools by explicitly stating what it is NOT for (release asset links, secure files, etc.).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'When to use:' and 'NOT for:' sections provide clear guidance. Also references sibling tools gitlab_release and gitlab_admin secure_file_*, and gitlab_project for attachments.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jmrplens/gitlab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server