Skip to main content
Glama

Analyze

gitlab_analyze
Read-onlyIdempotent

Analyze GitLab artifacts (MRs, issues, pipelines, CI configs, milestones, deployments) using LLM. Generate Markdown summaries, code reviews, failure root cause analysis, release notes, and technical debt reports for AI-driven insights.

Instructions

Example: {"action":"ci_config","params":{...}} For the params schema of any action, read the MCP resource 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); 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_ref*, to_ref*. Generate categorized release notes between refs.

  • 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; 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?

Beyond annotations (readOnlyHint, idempotentHint), the description adds crucial behavioral details: requires sampling capability, returns SamplingUnsupportedResult otherwise, and per-action effects like fetching data then asking LLM to analyze.

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 with clear sections (example, explanation, when/not, returns, errors, per-action params). It earns its length given the complexity but could be slightly tighter.

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?

Covers all necessary aspects: actions, params, sampling dependency, error handling, output format, and alternatives. Despite having an output schema, it still describes return structure, making it fully informative.

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?

Schema coverage is 100% (baseline 3), but description adds significant value: lists per-action required/optional params, explains unknown keys rejection, and references MCP resource for full schema. This goes well beyond the schema alone.

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 is for LLM-assisted analysis of GitLab data via MCP sampling, explicitly distinguishing it from sibling tools used for raw data retrieval (e.g., gitlab_merge_request).

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 guidance on when to use (interpret GitLab artifacts via LLM) and when not to (raw data, long-form reports, clients without sampling), with specific alternative tools listed.

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