appearance

package
v1.0.5 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 appearance implements MCP tool handlers for GitLab application appearance. It wraps the AppearanceService from client-go v2. These are admin-only endpoints requiring administrator access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatGetMarkdown

func FormatGetMarkdown(out GetOutput) *mcp.CallToolResult

FormatGetMarkdown formats appearance into markdown.

func FormatUpdateMarkdown

func FormatUpdateMarkdown(out UpdateOutput) *mcp.CallToolResult

FormatUpdateMarkdown formats the updated appearance response.

func RegisterTools

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

RegisterTools registers all appearance tools on the MCP server.

Types

type GetInput

type GetInput struct{}

GetInput is the input for getting appearance (no parameters needed).

type GetOutput

type GetOutput struct {
	toolutil.HintableOutput
	Appearance Item `json:"appearance"`
}

GetOutput contains the application appearance.

func Get

func Get(ctx context.Context, client *gitlabclient.Client, _ GetInput) (GetOutput, error)

Get retrieves the current application appearance (admin-only).

type Item

type Item struct {
	Title                       string `json:"title"`
	Description                 string `json:"description,omitempty"`
	PWAName                     string `json:"pwa_name,omitempty"`
	PWAShortName                string `json:"pwa_short_name,omitempty"`
	PWADescription              string `json:"pwa_description,omitempty"`
	PWAIcon                     string `json:"pwa_icon,omitempty"`
	Favicon                     string `json:"favicon,omitempty"`
	MemberGuidelines            string `json:"member_guidelines,omitempty"`
	NewProjectGuidelines        string `json:"new_project_guidelines,omitempty"`
	ProfileImageGuidelines      string `json:"profile_image_guidelines,omitempty"`
	HeaderMessage               string `json:"header_message,omitempty"`
	FooterMessage               string `json:"footer_message,omitempty"`
	MessageBackgroundColor      string `json:"message_background_color,omitempty"`
	MessageFontColor            string `json:"message_font_color,omitempty"`
	EmailHeaderAndFooterEnabled bool   `json:"email_header_and_footer_enabled"`
}

Item represents the application appearance in output.

type UpdateInput

type UpdateInput struct {
	Title                       string `json:"title,omitempty" jsonschema:"Application title displayed in the header"`
	Description                 string `json:"description,omitempty" jsonschema:"Instance description on sign-in page"`
	PWAName                     string `json:"pwa_name,omitempty" jsonschema:"Progressive Web App name"`
	PWAShortName                string `json:"pwa_short_name,omitempty" jsonschema:"PWA short name"`
	PWADescription              string `json:"pwa_description,omitempty" jsonschema:"PWA description"`
	HeaderMessage               string `json:"header_message,omitempty" jsonschema:"Message in header bar"`
	FooterMessage               string `json:"footer_message,omitempty" jsonschema:"Message in footer bar"`
	MessageBackgroundColor      string `json:"message_background_color,omitempty" jsonschema:"Background color for header/footer messages (hex)"`
	MessageFontColor            string `json:"message_font_color,omitempty" jsonschema:"Font color for header/footer messages (hex)"`
	EmailHeaderAndFooterEnabled *bool  `json:"email_header_and_footer_enabled,omitempty" jsonschema:"Enable header and footer in emails"`
	MemberGuidelines            string `json:"member_guidelines,omitempty" jsonschema:"Markdown guidelines for adding members"`
	NewProjectGuidelines        string `json:"new_project_guidelines,omitempty" jsonschema:"Markdown guidelines for new projects"`
	ProfileImageGuidelines      string `json:"profile_image_guidelines,omitempty" jsonschema:"Markdown guidelines for profile images"`
}

UpdateInput is the input for changing appearance.

type UpdateOutput

type UpdateOutput struct {
	toolutil.HintableOutput
	Appearance Item `json:"appearance"`
}

UpdateOutput contains the updated appearance.

func Update

func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (UpdateOutput, error)

Update changes the application appearance (admin-only).

Jump to

Keyboard shortcuts

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