errortracking

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package errortracking implements MCP tools for GitLab Error Tracking operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteClientKey

func DeleteClientKey(ctx context.Context, client *gitlabclient.Client, input DeleteClientKeyInput) error

DeleteClientKey deletes an error tracking client key.

func FormatKeyMarkdown

func FormatKeyMarkdown(k ClientKeyItem) string

FormatKeyMarkdown formats a single client key as markdown.

func FormatListKeysMarkdown

func FormatListKeysMarkdown(out ListClientKeysOutput) string

FormatListKeysMarkdown formats client keys as markdown.

func FormatSettingsMarkdown

func FormatSettingsMarkdown(out SettingsOutput) string

FormatSettingsMarkdown formats error tracking settings as markdown.

func RegisterMeta

func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)

RegisterMeta registers the gitlab_error_tracking meta-tool.

func RegisterTools

func RegisterTools(server *mcp.Server, client *gitlabclient.Client)

RegisterTools registers all error tracking tools with the MCP server.

Types

type ClientKeyItem

type ClientKeyItem struct {
	toolutil.HintableOutput
	ID        int64  `json:"id"`
	Active    bool   `json:"active"`
	PublicKey string `json:"public_key"`
	SentryDsn string `json:"sentry_dsn"`
}

ClientKeyItem represents an error tracking client key.

func CreateClientKey

func CreateClientKey(ctx context.Context, client *gitlabclient.Client, input CreateClientKeyInput) (ClientKeyItem, error)

CreateClientKey creates a new error tracking client key.

type CreateClientKeyInput

type CreateClientKeyInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}

CreateClientKeyInput contains parameters for creating a client key.

type DeleteClientKeyInput

type DeleteClientKeyInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	KeyID     int64                `json:"key_id" jsonschema:"Client key ID,required"`
}

DeleteClientKeyInput contains parameters for deleting a client key.

type EnableDisableInput

type EnableDisableInput struct {
	ProjectID  toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	Active     *bool                `json:"active" jsonschema:"Enable or disable error tracking"`
	Integrated *bool                `json:"integrated" jsonschema:"Use integrated error tracking"`
}

EnableDisableInput contains parameters for enabling/disabling error tracking.

type GetSettingsInput

type GetSettingsInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}

GetSettingsInput contains parameters for getting error tracking settings.

type ListClientKeysInput

type ListClientKeysInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	Page      int64                `json:"page" jsonschema:"Page number for pagination"`
	PerPage   int64                `json:"per_page" jsonschema:"Number of items per page"`
}

ListClientKeysInput contains parameters for listing error tracking client keys.

type ListClientKeysOutput

type ListClientKeysOutput struct {
	toolutil.HintableOutput
	Keys       []ClientKeyItem           `json:"keys"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListClientKeysOutput contains a list of error tracking client keys.

func ListClientKeys

func ListClientKeys(ctx context.Context, client *gitlabclient.Client, input ListClientKeysInput) (ListClientKeysOutput, error)

ListClientKeys retrieves error tracking client keys for a project.

type SettingsOutput

type SettingsOutput struct {
	toolutil.HintableOutput
	Active            bool   `json:"active"`
	ProjectName       string `json:"project_name"`
	SentryExternalURL string `json:"sentry_external_url,omitempty"`
	APIURL            string `json:"api_url,omitempty"`
	Integrated        bool   `json:"integrated"`
}

SettingsOutput contains error tracking settings.

func EnableDisable

func EnableDisable(ctx context.Context, client *gitlabclient.Client, input EnableDisableInput) (SettingsOutput, error)

EnableDisable enables or disables error tracking for a project.

func GetSettings

func GetSettings(ctx context.Context, client *gitlabclient.Client, input GetSettingsInput) (SettingsOutput, error)

GetSettings retrieves error tracking settings for a project.

Jump to

Keyboard shortcuts

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