Skip to main content
Glama

Analyze

gitlab_analyze
Read-onlyIdempotent

Analyze GitLab merge request changes, issue discussions, pipeline failures, and CI configurations using LLM to generate summaries, identify issues, and suggest improvements.

Instructions

Use {"action":"ci_config","params":{...}}; only top-level keys are action and params. Action params schema: gitlab://schema/meta/gitlab_analyze/.

LLM-assisted analysis of GitLab data via MCP sampling. Each action fetches data through GitLab APIs, then asks the connected LLM (the host's sampling capability) to summarize / analyze / classify it. Requires the client to advertise sampling capability — actions return SamplingUnsupportedResult otherwise (human-in-the-loop on the client side). When to use: ask an LLM to interpret GitLab artifacts — MR diffs, issue threads, pipeline failures, CI configs, milestone progress, deployment history, technical-debt markers — and produce Markdown narratives, scopes, or release notes. NOT for: raw data retrieval without LLM analysis (use gitlab_merge_request / gitlab_issue / gitlab_pipeline / gitlab_release / gitlab_repository); skipping explicit prerequisite inspection/list/compare steps requested by the user; long-form report generation outside the chat session; clients without sampling support (the action returns a SamplingUnsupportedResult).

Returns: each action returns action-specific JSON (typically identifiers + a text field plus model and truncated flags) and a Markdown summary suitable for direct display. Per-action text key:

  • summary: issue_summary, mr_review

  • analysis: mr_changes, pipeline_failure, ci_config, issue_scope, technical_debt, deployment_history

  • review: mr_security

  • report: milestone_report

  • release_notes: release_notes Alongside the resource identifiers (merge_request_iid, issue_iid, pipeline_id, milestone_iid, project_id) supplied as input. Errors: 404 (hint: project_id, merge_request_iid, issue_iid, pipeline_id, milestone_iid must exist), 403 (hint: caller must have access to the underlying resource), SamplingUnsupportedResult when the client did not advertise sampling capability.

All actions need project_id*. Additional params per action:

  • mr_changes: merge_request_iid*. Analyze MR code changes for quality, bugs, improvements.

  • issue_summary: issue_iid*. Summarize discussion with key decisions and action items.

  • release_notes: from*, to. Generate categorized release notes between refs. to defaults to HEAD. from_ref/to_ref aliases are accepted but from/to are canonical. If the user asks to inspect releases or compare refs first, call those tools before release_notes.

  • pipeline_failure: pipeline_id*. Root cause analysis with fix suggestions.

  • mr_review: merge_request_iid*. Summarize review feedback and unresolved threads.

  • milestone_report: milestone_iid*. Progress report with metrics.

  • ci_config: content_ref. Analyze CI/CD config for best practices and security.

  • issue_scope: issue_iid*. Scope, complexity, and breakdown recommendations.

  • mr_security: merge_request_iid*. OWASP Top 10, secrets, auth review.

  • technical_debt: ref. Find TODO/FIXME/HACK markers.

  • deployment_history: environment. Frequency, success rate, patterns.

See also: gitlab_merge_request (MR lifecycle), gitlab_issue (issue CRUD), gitlab_pipeline (raw pipelines and test reports), gitlab_release (release CRUD).

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?

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. The description adds substantial behavioral context: the tool requires sampling capability, returns specific error types (SamplingUnsupportedResult, 404, 403), and describes the output format (JSON + Markdown summary). 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 verbose but well-structured: it opens with usage pattern, explains mechanism, then provides when/not, returns, errors, and per-action details. Every sentence serves a purpose given the tool's complexity (11 actions). Minor redundancy exists (e.g., repeating 'action-specific JSON'), but overall it's appropriately sized.

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?

For a complex tool with 11 actions, many parameters, and an output schema, the description is thorough. It covers error handling, return value structure, per-action parameter lists, and cross-references to sibling tools. The presence of an output schema reduces the burden, but the description still adds value by explaining the Markdown summary and text keys.

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 action and params. The description goes far beyond by listing each action's expected parameters, providing usage details (e.g., 'from/to are canonical', alias support), and clarifying runtime validation. This adds significant meaning beyond the basic schema.

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 using a specific verb-resource combination: 'LLM-assisted analysis of GitLab data via MCP sampling'. It distinguishes from sibling tools by explicitly listing what the tool is NOT for (raw data retrieval) and naming alternative tools (gitlab_merge_request, 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?

The description provides explicit when-to-use scenarios ('ask an LLM to interpret GitLab artifacts') and when-not-to-use scenarios ('NOT for raw data retrieval', 'clients without sampling support'). It names alternative tools for excluded cases and includes prerequisites (sampling capability). This meets the highest standard of guidance.

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