Documentation
¶
Overview ¶
Package epicnotes implements MCP tools for GitLab epic note operations.
The package wraps the GitLab Notes API for epic notes:
Index ¶
- func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
- func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
- func DeleteOutput(ctx context.Context, client *gitlabclient.Client, input DeleteInput) (toolutil.DeleteOutput, error)
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(n Output) string
- type CreateInput
- type DeleteInput
- type GetInput
- type ListInput
- type ListOutput
- type NoteUserOutput
- type Output
- type UpdateInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionSpecs ¶
func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
ActionSpecs returns canonical specs for epic note actions exposed as MCP tools. The list/get/create/update/delete routes are projected into the dynamic, meta, individual, and audit surfaces by the action catalog (ADR-0004). Epic notes are a Premium/Ultimate (Edition: premium) capability served through the Work Items GraphQL API.
func Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
Delete removes a note from an epic via the destroyNote GraphQL mutation.
func DeleteOutput ¶
func DeleteOutput(ctx context.Context, client *gitlabclient.Client, input DeleteInput) (toolutil.DeleteOutput, error)
DeleteOutput deletes an epic note and returns the canonical success message shape.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown renders a list of epic notes as a Markdown table.
func FormatOutputMarkdown ¶
FormatOutputMarkdown renders a single epic note as a Markdown summary.
Types ¶
type CreateInput ¶
type CreateInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"epic_iid" jsonschema:"Epic IID within the group,required"`
Body string `json:"body" jsonschema:"Note body (Markdown supported),required"`
}
CreateInput defines parameters for creating a note on an epic.
type DeleteInput ¶
type DeleteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"epic_iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"ID of the note to delete,required"`
}
DeleteInput defines parameters for deleting an epic 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:"epic_iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"ID of the note to retrieve,required"`
}
GetInput defines parameters for getting a single epic note.
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:"epic_iid" jsonschema:"Epic IID within the group,required"`
toolutil.GraphQLPaginationInput
}
ListInput defines parameters for listing epic notes.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Notes []Output `json:"notes"`
Pagination toolutil.GraphQLPaginationOutput `json:"pagination"`
}
ListOutput holds a paginated list of epic notes.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List retrieves notes on an epic via the Work Items GraphQL API. Notes are extracted from all discussions in the notes widget.
type NoteUserOutput ¶ added in v2.3.0
type NoteUserOutput struct {
ID int64 `json:"id"`
Username string `json:"username"`
Name string `json:"name,omitempty"`
WebURL string `json:"web_url,omitempty"`
AvatarURL string `json:"avatar_url,omitempty"`
}
NoteUserOutput mirrors the GraphQL User fields selected for a note author: the user who authored the note.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Body string `json:"body"`
Author *NoteUserOutput `json:"author,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at,omitempty"`
System bool `json:"system"`
}
Output represents a note (comment) on an epic. Per the locked canonical-key convention the full *NoteUserOutput author object is surfaced on the canonical `author` key. Only fields the Work Items GraphQL notes widget actually returns are populated (no invented output scalars per the 1:1 audit policy).
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
Create adds a new note to an epic via the createNote GraphQL mutation.
func Get ¶
Get retrieves a single note on an epic by querying the notes widget and matching by note ID.
func Update ¶
func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (Output, error)
Update modifies the body of an existing epic note via the updateNote GraphQL mutation.
type UpdateInput ¶
type UpdateInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"epic_iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"ID of the note to update,required"`
Body string `json:"body" jsonschema:"Updated note body (Markdown supported),required"`
}
UpdateInput defines parameters for updating an epic note.