Skip to main content
Glama

Template

gitlab_template
Read-onlyIdempotent

Discover and fetch built-in GitLab templates for gitignore, CI/CD YAML, Dockerfiles, licenses, and project scaffolds. Validate CI configuration with linting.

Instructions

Use {"action":"ci_yml_get","params":{...}}; only top-level keys are action and params. Action params schema: 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. 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?

Discloses that the tool is read-only but notes that ci_lint may resolve `include:` directives fetching remote URLs, going beyond annotations (readOnlyHint=true, openWorldHint=true). Also describes return structures per action and error conditions. 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: it starts with the action pattern, then an overview, followed by usage guidelines, returns, errors, parameter conventions, and action-specific details. It is front-loaded with essential information. While it could be slightly more concise, the structure is logical and easy to navigate.

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 (multiple actions, per-action parameters, and an output schema), the description is complete. It covers all action types, returns, errors, and cross-references to related tools. The output schema exists but the description summarizes returns sufficiently (e.g., {name, content}).

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 has 100% coverage with descriptions for both parameters, but the description adds per-action parameter lists, conventions (required marked with *), and specific parameter values (e.g., template_type enumeration). This adds substantial meaning beyond the schema, especially for the broad `params` object.

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 the tool's purpose: browse GitLab built-in templates and lint CI configuration. It lists specific actions (ci_yml_get, ci_yml_list, etc.) and explicitly distinguishes from sibling tools like gitlab_ci_catalog, gitlab_pipeline, gitlab_ci_variable, and gitlab_repository with clear 'NOT for' statements.

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' and 'NOT for' sections, naming alternative tools for excluded use cases. Also includes error handling hints for 404, 403, and 400 responses, guiding the agent on what to do when errors occur.

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