Documentation
¶
Overview ¶
Package epicdiscussions implements MCP tools for GitLab epic discussion operations using the Work Items GraphQL API. Discussions are threaded conversations on group epics, each containing one or more notes.
This package was migrated from the deprecated Epics REST API (deprecated GitLab 17.0, removal planned 19.0) to the Work Items GraphQL API per ADR-0009 (progressive GraphQL migration).
Index ¶
- func DeleteNote(ctx context.Context, client *gitlabclient.Client, input DeleteNoteInput) error
- func FormatListMarkdown(out ListOutput) *mcp.CallToolResult
- func FormatListMarkdownString(out ListOutput) string
- func FormatMarkdown(out Output) *mcp.CallToolResult
- func FormatMarkdownString(out Output) string
- func FormatNoteMarkdown(out NoteOutput) *mcp.CallToolResult
- func FormatNoteMarkdownString(out NoteOutput) string
- func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type AddNoteInput
- type CreateInput
- type DeleteNoteInput
- type GetInput
- type ListInput
- type ListOutput
- type NoteOutput
- type Output
- type UpdateNoteInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteNote ¶
func DeleteNote(ctx context.Context, client *gitlabclient.Client, input DeleteNoteInput) error
DeleteNote deletes an epic discussion note via the destroyNote GraphQL mutation.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) *mcp.CallToolResult
FormatListMarkdown formats a list of discussions as Markdown.
func FormatListMarkdownString ¶
func FormatListMarkdownString(out ListOutput) string
FormatListMarkdownString renders discussions list as Markdown.
func FormatMarkdown ¶
func FormatMarkdown(out Output) *mcp.CallToolResult
FormatMarkdown formats a single discussion as Markdown.
func FormatMarkdownString ¶
FormatMarkdownString renders a discussion as Markdown.
func FormatNoteMarkdown ¶
func FormatNoteMarkdown(out NoteOutput) *mcp.CallToolResult
FormatNoteMarkdown formats a single note as Markdown.
func FormatNoteMarkdownString ¶
func FormatNoteMarkdownString(out NoteOutput) string
FormatNoteMarkdownString renders a note as Markdown.
func RegisterMeta ¶
func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
RegisterMeta registers the gitlab_epic_discussion meta-tool.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all epic discussion tools on the MCP server.
Types ¶
type AddNoteInput ¶
type AddNoteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
DiscussionID string `json:"discussion_id" jsonschema:"Discussion ID to reply to,required"`
Body string `json:"body" jsonschema:"Note body (Markdown supported),required"`
}
AddNoteInput defines parameters for adding a note to an epic discussion.
type CreateInput ¶
type CreateInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
Body string `json:"body" jsonschema:"Discussion body (Markdown supported),required"`
}
CreateInput defines parameters for creating an epic discussion.
type DeleteNoteInput ¶
type DeleteNoteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"Note ID to delete,required"`
}
DeleteNoteInput defines parameters for deleting an epic discussion note.
type GetInput ¶
type GetInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
DiscussionID string `json:"discussion_id" jsonschema:"Discussion ID,required"`
}
GetInput defines parameters for getting a single epic discussion.
type ListInput ¶
type ListInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group or my-group/sub-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
toolutil.GraphQLPaginationInput
}
ListInput defines parameters for listing epic discussions.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Discussions []Output `json:"discussions"`
Pagination toolutil.GraphQLPaginationOutput `json:"pagination"`
}
ListOutput holds a list of epic discussions.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List retrieves discussion threads on an epic via the Work Items GraphQL API.
type NoteOutput ¶
type NoteOutput struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Body string `json:"body"`
Author string `json:"author"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at,omitempty"`
System bool `json:"system"`
}
NoteOutput represents a single note within a discussion.
func AddNote ¶
func AddNote(ctx context.Context, client *gitlabclient.Client, input AddNoteInput) (NoteOutput, error)
AddNote adds a reply note to an existing discussion thread via the createNote GraphQL mutation with a discussionId.
func UpdateNote ¶
func UpdateNote(ctx context.Context, client *gitlabclient.Client, input UpdateNoteInput) (NoteOutput, error)
UpdateNote updates an existing epic discussion note via the updateNote GraphQL mutation.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID string `json:"id"`
Notes []NoteOutput `json:"notes"`
}
Output represents a discussion thread.
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
Create starts a new discussion thread on an epic via the createNote GraphQL mutation.
type UpdateNoteInput ¶
type UpdateNoteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"Note ID to update,required"`
Body string `json:"body" jsonschema:"Updated note body,required"`
}
UpdateNoteInput defines parameters for updating an epic discussion note.