gitlab

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package gitlab implements MCP tools for the GitLab API. Connect decodes the source's `connect:` map, builds a GitLab API client, and returns the configured tools. The two read-only tools (get_mr_discussions, get_mr_commits) set Annotations: ReadOnlyHint=true.

Package gitlab: request and response types for the GitLab MCP tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(
	_ context.Context,
	connect map[string]any,
	opts ...tool.Option,
) (tool.Response, error)

Connect decodes the source's `connect:` map, builds a GitLab API client, and returns the configured tools. Every tool is read-only (the implementer only ever queries the API) so all tools set Annotations: ReadOnlyHint=true.

Types

type GetMRCommitsRequest

type GetMRCommitsRequest struct {
	// URL is the full GitLab merge request URL.
	URL     string `json:"url"                yaml:"url"`
	Page    int64  `json:"page,omitempty"     yaml:"page,omitempty"`
	PerPage int64  `json:"per_page,omitempty" yaml:"per_page,omitempty"`
}

GetMRCommitsRequest is the request for the get_mr_commits tool.

type GetMRCommitsResponse

type GetMRCommitsResponse struct {
	Commits []*gitlab.Commit `json:"commits" yaml:"commits"`
}

GetMRCommitsResponse wraps the list of commits returned by the GitLab API.

type GetMRDiscussionsRequest

type GetMRDiscussionsRequest struct {
	// URL is the full GitLab merge request URL, e.g.
	// "https://gitlab.example.com/group/project/-/merge_requests/42"
	URL     string `json:"url"                yaml:"url"`
	Page    int64  `json:"page,omitempty"     yaml:"page,omitempty"`
	PerPage int64  `json:"per_page,omitempty" yaml:"per_page,omitempty"`
}

GetMRDiscussionsRequest is the request for the get_mr_discussions tool.

type GetMRDiscussionsResponse

type GetMRDiscussionsResponse struct {
	Discussions []*gitlab.Discussion `json:"discussions" yaml:"discussions"`
}

GetMRDiscussionsResponse wraps the list of discussions returned by the GitLab API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL