Documentation
¶
Overview ¶
Package groupmembers provides MCP tool handlers for GitLab group member operations.
markdown.go provides Markdown formatting functions for group member MCP tool output.
register.go wires groupmembers MCP tools to the MCP server.
Index ¶
- func FormatMemberMarkdown(out Output) string
- func FormatShareMarkdown(out ShareOutput) string
- func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- func RemoveMember(ctx context.Context, client *gitlabclient.Client, input RemoveInput) error
- func UnshareGroup(ctx context.Context, client *gitlabclient.Client, input UnshareInput) error
- type AddInput
- type EditInput
- type GetInput
- type Output
- func AddMember(ctx context.Context, client *gitlabclient.Client, input AddInput) (Output, error)
- func EditMember(ctx context.Context, client *gitlabclient.Client, input EditInput) (Output, error)
- func GetInheritedMember(ctx context.Context, client *gitlabclient.Client, input GetInput) (Output, error)
- func GetMember(ctx context.Context, client *gitlabclient.Client, input GetInput) (Output, error)
- type RemoveInput
- type ShareInput
- type ShareOutput
- type UnshareInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMemberMarkdown ¶
FormatMemberMarkdown formats a single group member as markdown.
func FormatShareMarkdown ¶
func FormatShareMarkdown(out ShareOutput) string
FormatShareMarkdown formats a group share result as markdown.
func RegisterMeta ¶
func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
RegisterMeta registers the gitlab_group_member meta-tool.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all group member individual tools.
func RemoveMember ¶
func RemoveMember(ctx context.Context, client *gitlabclient.Client, input RemoveInput) error
RemoveMember removes a member from a group.
func UnshareGroup ¶
func UnshareGroup(ctx context.Context, client *gitlabclient.Client, input UnshareInput) error
UnshareGroup removes a group share.
Types ¶
type AddInput ¶
type AddInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
UserID int64 `json:"user_id,omitempty" jsonschema:"User ID to add,required"`
Username string `json:"username,omitempty" jsonschema:"Username to add (alternative to user_id)"`
AccessLevel int `json:"access_level" jsonschema:"Access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)"`
ExpiresAt string `json:"expires_at,omitempty" jsonschema:"Membership expiration date (YYYY-MM-DD)"`
}
AddInput contains parameters for adding a group member.
type EditInput ¶
type EditInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID,required"`
AccessLevel int `json:"access_level,omitempty" jsonschema:"New access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)"`
ExpiresAt string `json:"expires_at,omitempty" jsonschema:"New membership expiration date (YYYY-MM-DD)"`
}
EditInput contains parameters for editing a group member.
type GetInput ¶
type GetInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID,required"`
}
GetInput contains parameters for getting a group member.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Username string `json:"username"`
Name string `json:"name"`
State string `json:"state"`
AvatarURL string `json:"avatar_url,omitempty"`
WebURL string `json:"web_url"`
AccessLevel int `json:"access_level"`
AccessLevelDescription string `json:"access_level_description"`
CreatedAt string `json:"created_at,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
Email string `json:"email,omitempty"`
MemberRoleName string `json:"member_role_name,omitempty"`
IsUsingSeat bool `json:"is_using_seat,omitempty"`
}
Output represents a single group member.
func EditMember ¶
EditMember edits a group member.
func GetInheritedMember ¶
func GetInheritedMember(ctx context.Context, client *gitlabclient.Client, input GetInput) (Output, error)
GetInheritedMember gets a single inherited group member.
type RemoveInput ¶
type RemoveInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID to remove,required"`
SkipSubresources bool `json:"skip_subresources,omitempty" jsonschema:"Skip removal from subresources"`
UnassignIssuables bool `json:"unassign_issuables,omitempty" jsonschema:"Unassign issues and merge requests"`
}
RemoveInput contains parameters for removing a group member.
type ShareInput ¶
type ShareInput struct {
}
ShareInput contains parameters for sharing a group with another group.
type ShareOutput ¶
type ShareOutput struct {
}
ShareOutput represents the result of sharing with a group.
func ShareGroup ¶
func ShareGroup(ctx context.Context, client *gitlabclient.Client, input ShareInput) (ShareOutput, error)
ShareGroup shares a group with another group.
type UnshareInput ¶
type UnshareInput struct {
}
UnshareInput contains parameters for unsharing a group.