Documentation
¶
Overview ¶
Package issuediscussions implements MCP tools for GitLab issue discussion operations.
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 issue discussion note.
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_issue_discussion meta-tool.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all issue discussion tools on the MCP server.
Types ¶
type AddNoteInput ¶
type AddNoteInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
IssueIID int64 `json:"issue_iid" jsonschema:"Issue internal ID,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 issue discussion.
type CreateInput ¶
type CreateInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
IssueIID int64 `json:"issue_iid" jsonschema:"Issue internal ID,required"`
Body string `json:"body" jsonschema:"Discussion body (Markdown supported),required"`
}
CreateInput defines parameters for creating an issue discussion.
type DeleteNoteInput ¶
type DeleteNoteInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
IssueIID int64 `json:"issue_iid" jsonschema:"Issue internal ID,required"`
DiscussionID string `json:"discussion_id" jsonschema:"Discussion ID,required"`
NoteID int64 `json:"note_id" jsonschema:"Note ID to delete,required"`
}
DeleteNoteInput defines parameters for deleting an issue discussion note.
type GetInput ¶
type GetInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
IssueIID int64 `json:"issue_iid" jsonschema:"Issue internal ID,required"`
DiscussionID string `json:"discussion_id" jsonschema:"Discussion ID,required"`
}
GetInput defines parameters for getting a single issue discussion.
type ListInput ¶
type ListInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
IssueIID int64 `json:"issue_iid" jsonschema:"Issue internal ID,required"`
Page int64 `json:"page,omitempty" jsonschema:"Page number for pagination"`
PerPage int64 `json:"per_page,omitempty" jsonschema:"Number of items per page"`
}
ListInput defines parameters for listing issue discussions.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Discussions []Output `json:"discussions"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput holds a list of issue discussions.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List lists issue discussions.
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 note to an existing issue discussion.
func UpdateNote ¶
func UpdateNote(ctx context.Context, client *gitlabclient.Client, input UpdateNoteInput) (NoteOutput, error)
UpdateNote updates an existing issue discussion note.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID string `json:"id"`
IndividualNote bool `json:"individual_note"`
Notes []NoteOutput `json:"notes"`
}
Output represents a discussion thread.
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
Create creates a new issue discussion thread.
type UpdateNoteInput ¶
type UpdateNoteInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
IssueIID int64 `json:"issue_iid" jsonschema:"Issue internal ID,required"`
DiscussionID string `json:"discussion_id" jsonschema:"Discussion ID,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 issue discussion note.