Documentation
¶
Overview ¶
Package accessrequests implements MCP tools for GitLab project and group access request operations using the AccessRequestsService API.
markdown.go provides Markdown formatting functions for access request MCP tool output.
register.go wires accessrequests MCP tools to the MCP server.
Index ¶
- func DenyGroup(ctx context.Context, client *gitlabclient.Client, input DenyGroupInput) error
- func DenyProject(ctx context.Context, client *gitlabclient.Client, input DenyProjectInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(out Output) string
- func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type ApproveGroupInput
- type ApproveProjectInput
- type DenyGroupInput
- type DenyProjectInput
- type ListGroupInput
- type ListOutput
- type ListProjectInput
- type Output
- func ApproveGroup(ctx context.Context, client *gitlabclient.Client, input ApproveGroupInput) (Output, error)
- func ApproveProject(ctx context.Context, client *gitlabclient.Client, input ApproveProjectInput) (Output, error)
- func RequestGroup(ctx context.Context, client *gitlabclient.Client, input RequestGroupInput) (Output, error)
- func RequestProject(ctx context.Context, client *gitlabclient.Client, input RequestProjectInput) (Output, error)
- type RequestGroupInput
- type RequestProjectInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DenyGroup ¶
func DenyGroup(ctx context.Context, client *gitlabclient.Client, input DenyGroupInput) error
DenyGroup denies a group access request.
func DenyProject ¶
func DenyProject(ctx context.Context, client *gitlabclient.Client, input DenyProjectInput) error
DenyProject denies a project access request.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown formats a list of access requests as markdown.
func FormatOutputMarkdown ¶
FormatOutputMarkdown formats a single access request as markdown.
func RegisterMeta ¶
func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)
RegisterMeta registers the gitlab_access_request meta-tool.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all access request MCP tools.
Types ¶
type ApproveGroupInput ¶
type ApproveGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID of the access requester,required"`
AccessLevel int `json:"access_level,omitempty" jsonschema:"Access level to grant (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer)"`
}
ApproveGroupInput represents the input for approving a group access request.
type ApproveProjectInput ¶
type ApproveProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID of the access requester,required"`
AccessLevel int `json:"access_level,omitempty" jsonschema:"Access level to grant (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer)"`
}
ApproveProjectInput represents the input for approving a project access request.
type DenyGroupInput ¶
type DenyGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID of the access requester,required"`
}
DenyGroupInput represents the input for denying a group access request.
type DenyProjectInput ¶
type DenyProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
UserID int64 `json:"user_id" jsonschema:"User ID of the access requester,required"`
}
DenyProjectInput represents the input for denying a project access request.
type ListGroupInput ¶
type ListGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
Page int `json:"page,omitempty" jsonschema:"Page number for pagination"`
PerPage int `json:"per_page,omitempty" jsonschema:"Number of items per page"`
}
ListGroupInput represents the input for listing group access requests.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
AccessRequests []Output `json:"access_requests"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput represents a paginated list of access requests.
func ListGroup ¶
func ListGroup(ctx context.Context, client *gitlabclient.Client, input ListGroupInput) (ListOutput, error)
ListGroup lists access requests for a group.
func ListProject ¶
func ListProject(ctx context.Context, client *gitlabclient.Client, input ListProjectInput) (ListOutput, error)
ListProject lists access requests for a project.
type ListProjectInput ¶
type ListProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
Page int `json:"page,omitempty" jsonschema:"Page number for pagination"`
PerPage int `json:"per_page,omitempty" jsonschema:"Number of items per page"`
}
ListProjectInput represents the input for listing project access requests.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Username string `json:"username"`
Name string `json:"name"`
State string `json:"state"`
CreatedAt string `json:"created_at,omitempty"`
RequestedAt string `json:"requested_at,omitempty"`
AccessLevel int `json:"access_level"`
}
Output represents a single access request.
func ApproveGroup ¶
func ApproveGroup(ctx context.Context, client *gitlabclient.Client, input ApproveGroupInput) (Output, error)
ApproveGroup approves a group access request.
func ApproveProject ¶
func ApproveProject(ctx context.Context, client *gitlabclient.Client, input ApproveProjectInput) (Output, error)
ApproveProject approves a project access request.
func RequestGroup ¶
func RequestGroup(ctx context.Context, client *gitlabclient.Client, input RequestGroupInput) (Output, error)
RequestGroup requests access to a group for the authenticated user.
func RequestProject ¶
func RequestProject(ctx context.Context, client *gitlabclient.Client, input RequestProjectInput) (Output, error)
RequestProject requests access to a project for the authenticated user.
type RequestGroupInput ¶
type RequestGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
}
RequestGroupInput represents the input for requesting access to a group.
type RequestProjectInput ¶
type RequestProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
}
RequestProjectInput represents the input for requesting access to a project.