Template
gitlab_templateDiscover available GitLab built-in templates and project scaffolds. Fetch their content to commit into repositories. Lint CI configuration to catch errors before pushing.
Instructions
Example: {"action":"ci_yml_get","params":{...}} For the params schema of any action, read the MCP resource gitlab://schema/meta/gitlab_template/.
Browse GitLab built-in templates (gitignore, CI/CD YAML, Dockerfile, license, project scaffolding) and lint CI configuration. Read-only; ci_lint may resolve include: directives that fetch remote URLs.
When to use: discover available built-in templates, fetch a template body to commit into a project, validate a .gitlab-ci.yml before pushing, or list project scaffolds.
NOT for: reusable Catalog components published by groups (use gitlab_ci_catalog), running pipelines (use gitlab_pipeline), CI/CD variables (use gitlab_ci_variable), repository files (use gitlab_repository).
Returns:
*_list: [{key, name}] with pagination (page, per_page, total, next_page).
*_get: {name, content} — paste
contentinto the target file.lint / lint_project: {valid (bool), errors: [string], warnings: [string], merged_yaml (string), jobs: [...] when include_jobs=true}. Errors: 404 not found (hint: check key or template_type), 403 forbidden, 400 invalid params (hint: content required for lint, project_id required for project_template_*).
Param conventions: * = required. template_type ∈ {dockerfiles, gitignores, gitlab_ci_ymls, licenses}.
CI lint:
lint: project_id*, content*, dry_run (bool), include_jobs (bool), ref
lint_project: project_id*, content_ref, dry_run (bool), dry_run_ref, include_jobs (bool), ref
Global templates:
ci_yml_list / dockerfile_list / gitignore_list: page, per_page
ci_yml_get / dockerfile_get / gitignore_get: key*
license_list: page, per_page, popular (bool)
license_get: key*, project, fullname
Project templates:
project_template_list: project_id*, template_type*, page, per_page
project_template_get: project_id*, template_type*, key*
See also: gitlab_ci_catalog (reusable Catalog components), gitlab_pipeline (run pipelines), gitlab_project (project membership/settings).
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. |