mcp

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAssetCard

func FormatAssetCard(a *asset.Asset, marmotURL string) string

FormatAssetCard creates a visually appealing card for an asset

func FormatAssetList

func FormatAssetList(assets []*asset.Asset, total int, marmotURL string) string

FormatAssetList creates a compact list of assets

func FormatNextActions

func FormatNextActions(actions map[string]string) string

FormatNextActions formats suggested next actions

func FormatOwnershipResult

func FormatOwnershipResult(ownerName, ownerType string, assets []*asset.Asset, terms []*glossary.GlossaryTerm, marmotURL string) string

FormatOwnershipResult creates a rich ownership display

func FormatSearchSummary

func FormatSearchSummary(total, count int, filters interface{}) string

FormatSearchSummary creates a summary with filters

func FormatTermCard

func FormatTermCard(term *glossary.GlossaryTerm, marmotURL string) string

FormatTermCard creates a rich glossary term display

Types

type DiscoverDataInput

type DiscoverDataInput struct {
	Query           string                `json:"query,omitempty"`
	ID              string                `json:"id,omitempty"`
	MRN             string                `json:"mrn,omitempty"`
	Types           []string              `json:"types,omitempty"`
	Providers       []string              `json:"providers,omitempty"`
	Tags            []string              `json:"tags,omitempty"`
	MetadataFilters []MetadataFilterInput `json:"metadata_filters,omitempty"`
	Limit           int                   `json:"limit,omitempty"`
	Offset          int                   `json:"offset,omitempty"`
}

type FindOwnershipInput

type FindOwnershipInput struct {
	AssetID              string `json:"asset_id,omitempty"`
	UserID               string `json:"user_id,omitempty"`
	Username             string `json:"username,omitempty"`
	TeamID               string `json:"team_id,omitempty"`
	TeamName             string `json:"team_name,omitempty"`
	IncludeAssets        bool   `json:"include_assets,omitempty"`
	IncludeGlossaryTerms bool   `json:"include_glossary_terms,omitempty"`
	Limit                int    `json:"limit,omitempty"`
	Offset               int    `json:"offset,omitempty"`
}

type GlossaryService

type GlossaryService interface {
	Get(ctx context.Context, id string) (*glossary.GlossaryTerm, error)
	Search(ctx context.Context, filter glossary.SearchFilter) (*glossary.ListResult, error)
}

type LookupTermInput

type LookupTermInput struct {
	Query  string `json:"query,omitempty"`
	TermID string `json:"term_id,omitempty"`
	Limit  int    `json:"limit,omitempty"`
	Offset int    `json:"offset,omitempty"`
}

type MetadataFilterInput

type MetadataFilterInput struct {
	Key      string `json:"key"`
	Operator string `json:"operator"`
	Value    any    `json:"value"`
}

type Owner

type Owner struct {
	Type  string  `json:"type"`
	ID    string  `json:"id"`
	Name  string  `json:"name"`
	Email *string `json:"email,omitempty"`
}

type Server

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

func NewServer

func NewServer(
	assetService asset.Service,
	glossaryService GlossaryService,
	userService user.Service,
	teamService TeamService,
	lineageService lineage.Service,
	config *config.Config,
) *Server

func (*Server) CreateMCPServer

func (s *Server) CreateMCPServer(ctx context.Context, user *user.User) *mcpsdk.Server

type Team

type Team struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type TeamService

type TeamService interface {
	GetTeam(ctx context.Context, id string) (*Team, error)
	GetTeamByName(ctx context.Context, name string) (*Team, error)
	FindSimilarTeamNames(ctx context.Context, searchTerm string, limit int) ([]string, error)
	ListAssetOwners(ctx context.Context, assetID string) ([]Owner, error)
}

type ToolContext

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

ToolContext holds services needed for MCP tools

Jump to

Keyboard shortcuts

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