Skip to main content
Glama

Package

gitlab_package
Destructive

Publish, download, list, and delete packages and container images; manage protection rules for GitLab registry.

Instructions

Use {"action":"delete","params":{...}}; only top-level keys are action and params. Action params schema: 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. This envelope schema stays broad; runtime validation applies the chosen action's schema after reserved meta keys like `confirm` are stripped. 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?

The description goes far beyond the annotations (destructiveHint, openWorldHint) by detailing idempotency for each action, side effects (publish_and_link creates release link), destructive irreversibility, protection rule blocking, and error hints. It also explains return types and pagination. No contradiction with annotations.

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

Conciseness4/5

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

The description is long but well-structured with clear sections (Behavior, Returns, Errors, Param conventions, per-category actions). It front-loads the action envelope usage. However, some redundancy exists (e.g., repeating action lists), but the complexity warrants thoroughness. A slight trim could improve conciseness.

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?

Given the tool's complexity (24 actions across package, container registry, and protection rules), the description is comprehensive: covers all actions, their parameters, return types, error handling, and parameter conventions. The output schema is effectively described via the Returns section, so completeness is maximized.

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?

While the input schema only has 'action' and 'params', the description lists each action's required and optional parameters with details like field names, types, and constraints (e.g., 'file_path or content_base64 (one required)'). This adds significant meaning beyond the generic schema, which has 100% coverage but lacks action-specific details.

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?

The description clearly states it manages GitLab package registry, container registry, and protection rules. It uses specific verbs (upload/download/list/delete/browse) and distinguishes from sibling tools by explicitly listing what it is NOT for (release asset links, secure files, ML model registry, general attachments). This meets the highest standard of purpose clarity.

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?

Provides explicit when-to-use scenarios (publish/download/list/delete generic packages, browse registries, manage protection rules) and when-not-to-use with references to alternative sibling tools (gitlab_release, gitlab_admin, gitlab_model_registry, gitlab_project). The 'NOT for' section and 'See also' references give clear guidance on tool selection.

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