groupwikis

package
v1.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package groupwikis implements MCP tool handlers for GitLab group wiki operations including list, get, create, edit, and delete pages.

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 wiki page from a GitLab group.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown renders a list of group wiki pages as a Markdown table.

func FormatOutputMarkdown

func FormatOutputMarkdown(out Output) string

FormatOutputMarkdown renders a single group wiki page as Markdown.

func RegisterTools

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

RegisterTools registers group wiki tools on the MCP server.

Types

type CreateInput

type CreateInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	Title   string               `json:"title"            jsonschema:"Title of the wiki page,required"`
	Content string               `json:"content"          jsonschema:"Content of the wiki page,required"`
	Format  string               `json:"format,omitempty" jsonschema:"Content format: markdown (default), rdoc, asciidoc, or org"`
}

CreateInput defines parameters for the Create action which creates a new group wiki page.

type DeleteInput

type DeleteInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	Slug    string               `json:"slug"     jsonschema:"URL-encoded slug of the wiki page to delete,required"`
}

DeleteInput defines parameters for the Delete action which removes a group wiki page by slug.

type EditInput

type EditInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	Slug    string               `json:"slug"              jsonschema:"URL-encoded slug of the wiki page to edit,required"`
	Title   string               `json:"title,omitempty"   jsonschema:"New title"`
	Content string               `json:"content,omitempty" jsonschema:"New content"`
	Format  string               `json:"format,omitempty"  jsonschema:"Content format: markdown, rdoc, asciidoc, or org"`
}

EditInput defines parameters for the Edit action which updates an existing group wiki page.

type GetInput

type GetInput struct {
	GroupID    toolutil.StringOrInt `json:"group_id"             jsonschema:"Group ID or URL-encoded path,required"`
	Slug       string               `json:"slug"                  jsonschema:"URL-encoded slug of the wiki page,required"`
	RenderHTML bool                 `json:"render_html,omitempty" jsonschema:"Return HTML-rendered content"`
	Version    string               `json:"version,omitempty"     jsonschema:"Wiki page version SHA"`
}

GetInput defines parameters for the Get action which retrieves a single group wiki page by slug.

type ListInput

type ListInput struct {
	GroupID     toolutil.StringOrInt `json:"group_id"              jsonschema:"Group ID or URL-encoded path,required"`
	WithContent bool                 `json:"with_content,omitempty" jsonschema:"Include page content in the response"`
}

ListInput defines parameters for the List action which retrieves all group wiki pages.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	WikiPages []Output `json:"wiki_pages"`
}

ListOutput is the result of the List action containing all wiki pages for a group.

func List

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

List retrieves all wiki pages for a GitLab group.

type Output

type Output struct {
	toolutil.HintableOutput
	Title    string `json:"title"`
	Slug     string `json:"slug"`
	Format   string `json:"format"`
	Content  string `json:"content,omitempty"`
	Encoding string `json:"encoding,omitempty"`
}

Output represents a single GitLab group wiki page returned by Get, Create, or Edit.

func Create

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

Create creates a new wiki page in a GitLab group.

func Edit

func Edit(ctx context.Context, client *gitlabclient.Client, input EditInput) (Output, error)

Edit updates an existing wiki page in a GitLab group.

func Get

func Get(ctx context.Context, client *gitlabclient.Client, input GetInput) (Output, error)

Get retrieves a single wiki page from a GitLab group.

Jump to

Keyboard shortcuts

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