Documentation
¶
Overview ¶
Package customattributes implements MCP tools for GitLab Custom Attributes API.
Index ¶
- func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
- func FormatGetMarkdown(out GetOutput) string
- func FormatListMarkdown(out ListOutput) string
- func FormatSetMarkdown(out SetOutput) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type AttributeItem
- type DeleteInput
- type GetInput
- type GetOutput
- type ListInput
- type ListOutput
- type SetInput
- type SetOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
Delete deletes a custom attribute (admin).
func FormatGetMarkdown ¶
FormatGetMarkdown formats a single custom attribute as markdown.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown formats custom attributes list as markdown.
func FormatSetMarkdown ¶
FormatSetMarkdown formats a set custom attribute result as markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all Custom Attributes MCP tools.
Types ¶
type AttributeItem ¶
AttributeItem represents a single custom attribute.
type DeleteInput ¶
type DeleteInput struct {
ResourceType string `json:"resource_type" jsonschema:"Resource type: user, group, or project,required"`
ResourceID int64 `json:"resource_id" jsonschema:"ID of the resource,required"`
Key string `json:"key" jsonschema:"Attribute key to delete,required"`
}
DeleteInput is the input for deleting a custom attribute.
type GetInput ¶
type GetInput struct {
ResourceType string `json:"resource_type" jsonschema:"Resource type: user, group, or project,required"`
ResourceID int64 `json:"resource_id" jsonschema:"ID of the resource,required"`
Key string `json:"key" jsonschema:"Attribute key,required"`
}
GetInput is the input for getting a custom attribute.
type GetOutput ¶
type GetOutput struct {
toolutil.HintableOutput
AttributeItem
}
GetOutput is the output for getting a custom attribute.
type ListInput ¶
type ListInput struct {
ResourceType string `json:"resource_type" jsonschema:"Resource type: user, group, or project,required"`
ResourceID int64 `json:"resource_id" jsonschema:"ID of the resource,required"`
}
ListInput is the input for listing custom attributes.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Attributes []AttributeItem `json:"attributes"`
}
ListOutput is the output for listing custom attributes.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List lists custom attributes for a resource (admin).
type SetInput ¶
type SetInput struct {
ResourceType string `json:"resource_type" jsonschema:"Resource type: user, group, or project,required"`
ResourceID int64 `json:"resource_id" jsonschema:"ID of the resource,required"`
Key string `json:"key" jsonschema:"Attribute key,required"`
Value string `json:"value" jsonschema:"Attribute value,required"`
}
SetInput is the input for setting a custom attribute.
type SetOutput ¶
type SetOutput struct {
toolutil.HintableOutput
AttributeItem
}
SetOutput is the output for setting a custom attribute.