completions

package
v2.5.2 Latest Latest
Warning

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

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

Documentation

Overview

Package completions provides a CompletionHandler for GitLab-aware autocomplete of prompt arguments and resource URI template parameters.

It queries GitLab search and project endpoints to return canonical argument values suitable for MCP completion results. Completion values intentionally use concrete identifiers such as project paths, usernames, issue IIDs, merge request IIDs, labels, milestones, and branch names rather than display labels so clients can insert them directly into prompt or resource arguments.

MCP Contract

MCP completion results contain replacement values, not separate display text. This package therefore favors stable GitLab identifiers and returns empty completions on transient GitLab errors so autocomplete never blocks the calling client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler provides GitLab-aware completion for prompt arguments and resource parameters.

func NewHandler

func NewHandler(client *gitlabclient.Client) *Handler

NewHandler creates a completion handler backed by the given GitLab client.

func (*Handler) Complete

func (h *Handler) Complete(ctx context.Context, req *mcp.CompleteRequest) (*mcp.CompleteResult, error)

Complete dispatches completion requests based on reference type and argument name. It returns empty results on errors to avoid blocking the client.

Jump to

Keyboard shortcuts

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