applications

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package applications implements MCP tools for GitLab Applications API.

Index

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 an application (admin).

func FormatCreateMarkdown

func FormatCreateMarkdown(out CreateOutput) string

FormatCreateMarkdown formats a created application as markdown.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown formats application list as markdown.

func RegisterTools

func RegisterTools(server *mcp.Server, client *gitlabclient.Client)

RegisterTools registers all Applications MCP tools.

Types

type ApplicationItem

type ApplicationItem struct {
	ID              int64  `json:"id"`
	ApplicationID   string `json:"application_id"`
	ApplicationName string `json:"application_name"`
	Secret          string `json:"secret"`
	CallbackURL     string `json:"callback_url"`
	Confidential    bool   `json:"confidential"`
}

ApplicationItem represents a single application.

type CreateInput

type CreateInput struct {
	Name         string `json:"name" jsonschema:"Application name,required"`
	RedirectURI  string `json:"redirect_uri" jsonschema:"OAuth2 redirect URI,required"`
	Scopes       string `json:"scopes" jsonschema:"Space-separated list of scopes,required"`
	Confidential *bool  `json:"confidential,omitempty" jsonschema:"Whether application is confidential"`
}

CreateInput is the input for creating an application.

type CreateOutput

type CreateOutput struct {
	toolutil.HintableOutput
	ApplicationItem
}

CreateOutput is the output for creating an application.

func Create

func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (CreateOutput, error)

Create creates a new OAuth2 application (admin).

type DeleteInput

type DeleteInput struct {
	ID int64 `json:"id" jsonschema:"Application ID to delete,required"`
}

DeleteInput is the input for deleting an application.

type ListInput

type ListInput struct {
	Page    int64 `json:"page,omitempty" jsonschema:"Page number for pagination"`
	PerPage int64 `json:"per_page,omitempty" jsonschema:"Number of items per page"`
}

ListInput is the input for listing applications.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Applications []ApplicationItem         `json:"applications"`
	Pagination   toolutil.PaginationOutput `json:"pagination"`
}

ListOutput is the output for listing applications.

func List

func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)

List retrieves all applications (admin).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL