Documentation
¶
Overview ¶
Package groupwikis implements MCP tool handlers for GitLab group wiki operations including list, get, create, edit, and delete pages.
Index ¶
- func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(out Output) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type CreateInput
- type DeleteInput
- type EditInput
- type GetInput
- type ListInput
- type ListOutput
- type Output
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 ¶
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"`
}
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"`
}
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"`
}
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"`
}
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"`
}
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
WikiPages []Output `json:"wiki_pages"`
}
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"`
}
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
Create creates a new wiki page in a GitLab group.
Click to show internal directories.
Click to hide internal directories.