Skip to main content
Glama

Template

gitlab_template
Read-onlyIdempotent

Discover 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 content into 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

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?

Annotations already declare the tool as read-only, non-destructive, and idempotent. The description adds context that `ci_lint` may resolve external URLs via `include:`, explains pagination, and lists error codes with hints. It enriches understanding beyond annotations without contradiction.

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 lengthy but well-structured with sections, bullet points, and examples. Every part serves a purpose, though some details (like exhaustive per-action param lists) could be referenced externally. Still, it's efficient for the tool's complexity.

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 many actions, the description covers all: lists return types, error codes, parameter conventions, pagination, and references to sibling tools and external schema resources. It leaves no gaps for an agent to guess.

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?

The input schema provides descriptions but is generic for `params`. The description adds per-action parameter lists with conventions (e.g., `* = required`), valid enum values for `template_type`, and specific field names. This compensates for the schema's limited detail, giving full clarity.

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 explicitly states the tool's purpose: to browse GitLab built-in templates and lint CI configuration. It lists specific actions and return types, and clearly distinguishes from sibling tools (e.g., 'NOT for: reusable Catalog components (use gitlab_ci_catalog)'). This leaves no ambiguity.

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?

The description provides a clear 'When to use:' section and a 'NOT for:' section that names specific alternative tools. This gives explicit guidance on when to choose this tool over others, meeting the highest standard.

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