customemoji

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package customemoji implements MCP tool handlers for GitLab Custom Emoji management using the GraphQL API. Custom emoji are group-level assets with custom images, distinct from award emoji (reactions on issues/MRs).

markdown.go provides Markdown formatting for Custom Emoji outputs.

register.go wires Custom Emoji MCP tools to the MCP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error

Delete removes a custom emoji via the GitLab GraphQL API.

func FormatCreateMarkdown

func FormatCreateMarkdown(out CreateOutput) string

FormatCreateMarkdown renders a single created custom emoji as Markdown.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown renders a paginated list of custom emoji as Markdown.

func RegisterTools

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

RegisterTools registers Custom Emoji tools on the MCP server.

Types

type CreateInput

type CreateInput struct {
	GroupPath string `json:"group_path" jsonschema:"required,Group full path (e.g. my-group)"`
	Name      string `json:"name"       jsonschema:"required,Emoji name without colons (e.g. party_parrot)"`
	URL       string `json:"url"        jsonschema:"required,URL to the emoji image (PNG or GIF recommended)"`
}

CreateInput is the input for creating a custom emoji.

type CreateOutput

type CreateOutput struct {
	toolutil.HintableOutput
	Emoji Item `json:"emoji"`
}

CreateOutput is the output for creating a custom emoji.

func Create

func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (CreateOutput, error)

Create adds a new custom emoji to a group via the GitLab GraphQL API.

type DeleteInput

type DeleteInput struct {
	ID string `json:"id" jsonschema:"required,Custom emoji GID (e.g. gid://gitlab/CustomEmoji/1)"`
}

DeleteInput is the input for deleting a custom emoji.

type Item

type Item struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	URL       string `json:"url"`
	External  bool   `json:"external"`
	CreatedAt string `json:"created_at,omitempty"`
}

Item represents a custom emoji in a GitLab group.

type ListInput

type ListInput struct {
	GroupPath string `json:"group_path" jsonschema:"required,Group full path (e.g. my-group)"`
	toolutil.GraphQLPaginationInput
}

ListInput is the input for listing custom emoji.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Emoji      []Item                           `json:"emoji"`
	Pagination toolutil.GraphQLPaginationOutput `json:"pagination"`
}

ListOutput is the output for listing custom emoji.

func List

func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)

List retrieves custom emoji for a group via the GitLab GraphQL API.

Jump to

Keyboard shortcuts

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