runnercontrollerscopes

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package runnercontrollerscopes implements MCP tools for GitLab runner controller scope operations.

The package wraps GitLab GraphQL runner manager fields:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionSpecs

func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec

ActionSpecs returns canonical specs for runner controller scope actions.

These admin-only actions manage which runners a runner controller is permitted to operate: the instance-level scope grants the controller the whole shared instance runner fleet, while runner-level scopes pin the controller to specific instance runners. Each spec carries non-generic discovery metadata (action-specific Usage, runner-controller-scope-specific natural-language aliases, RelatedActions cross-links, and a "Returns: … See also: …" individual-tool description) per the 1:1 audit.

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 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