runnercontrollerscopes

package
v1.0.5 Latest Latest
Warning

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

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

Documentation

Overview

Package runnercontrollerscopes implements MCP tool handlers for GitLab Runner Controller Scopes. This is an admin-only API. Experimental: may change or be removed in future versions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatInstanceScopeMarkdown

func FormatInstanceScopeMarkdown(out InstanceScopeOutput) string

FormatInstanceScopeMarkdown renders an instance scope result as Markdown.

func FormatRunnerScopeMarkdown

func FormatRunnerScopeMarkdown(out RunnerScopeOutput) string

FormatRunnerScopeMarkdown renders a runner scope result as Markdown.

func FormatScopesMarkdown

func FormatScopesMarkdown(out ScopesOutput) string

FormatScopesMarkdown renders scopes as Markdown.

func FormatScopesResult

func FormatScopesResult(out ScopesOutput) *mcp.CallToolResult

FormatScopesResult formats scopes as an MCP tool result.

func RegisterMeta

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

RegisterMeta registers the gitlab_runner_controller_scope meta-tool.

func RegisterTools

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

RegisterTools registers all runner controller scope tools on the MCP server.

func RemoveInstanceScope

func RemoveInstanceScope(ctx context.Context, client *gitlabclient.Client, input RemoveInstanceScopeInput) error

RemoveInstanceScope removes the instance-level scope from a runner controller (admin only).

func RemoveRunnerScope

func RemoveRunnerScope(ctx context.Context, client *gitlabclient.Client, input RemoveRunnerScopeInput) error

RemoveRunnerScope removes a runner scope from a runner controller (admin only).

Types

type AddInstanceScopeInput

type AddInstanceScopeInput struct {
	ControllerID int64 `json:"controller_id" jsonschema:"Runner controller ID,required"`
}

AddInstanceScopeInput defines parameters for adding an instance-level scope.

type AddRunnerScopeInput

type AddRunnerScopeInput struct {
	ControllerID int64 `json:"controller_id" jsonschema:"Runner controller ID,required"`
	RunnerID     int64 `json:"runner_id" jsonschema:"Instance-level runner ID to scope,required"`
}

AddRunnerScopeInput defines parameters for adding a runner scope.

type InstanceScopeItem

type InstanceScopeItem struct {
	CreatedAt string `json:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

InstanceScopeItem represents an instance-level scope.

type InstanceScopeOutput

type InstanceScopeOutput struct {
	toolutil.HintableOutput
	CreatedAt string `json:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

InstanceScopeOutput represents a single instance scope result.

func AddInstanceScope

func AddInstanceScope(ctx context.Context, client *gitlabclient.Client, input AddInstanceScopeInput) (InstanceScopeOutput, error)

AddInstanceScope adds an instance-level scope to a runner controller (admin only).

type ListInput

type ListInput struct {
	ControllerID int64 `json:"controller_id" jsonschema:"Runner controller ID,required"`
}

ListInput defines parameters for listing runner controller scopes.

type RemoveInstanceScopeInput

type RemoveInstanceScopeInput struct {
	ControllerID int64 `json:"controller_id" jsonschema:"Runner controller ID,required"`
}

RemoveInstanceScopeInput defines parameters for removing an instance-level scope.

type RemoveRunnerScopeInput

type RemoveRunnerScopeInput struct {
	ControllerID int64 `json:"controller_id" jsonschema:"Runner controller ID,required"`
	RunnerID     int64 `json:"runner_id" jsonschema:"Runner ID to remove from scope,required"`
}

RemoveRunnerScopeInput defines parameters for removing a runner scope.

type RunnerScopeItem

type RunnerScopeItem struct {
	RunnerID  int64  `json:"runner_id"`
	CreatedAt string `json:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

RunnerScopeItem represents a runner-level scope.

type RunnerScopeOutput

type RunnerScopeOutput struct {
	toolutil.HintableOutput
	RunnerID  int64  `json:"runner_id"`
	CreatedAt string `json:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

RunnerScopeOutput represents a single runner scope result.

func AddRunnerScope

func AddRunnerScope(ctx context.Context, client *gitlabclient.Client, input AddRunnerScopeInput) (RunnerScopeOutput, error)

AddRunnerScope adds a runner scope to a runner controller (admin only).

type ScopesOutput

type ScopesOutput struct {
	toolutil.HintableOutput
	InstanceLevelScopings []InstanceScopeItem `json:"instance_level_scopings"`
	RunnerLevelScopings   []RunnerScopeItem   `json:"runner_level_scopings"`
}

ScopesOutput represents all scopes for a runner controller.

func List

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

List retrieves all scopes for a runner controller (admin only).

Jump to

Keyboard shortcuts

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