mcp

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 15 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 detailed view of an asset

func FormatAssetDataProducts added in v0.10.0

func FormatAssetDataProducts(products []*dataproduct.DataProduct, marmotURL string) string

FormatAssetDataProducts formats the data products an asset belongs to.

func FormatAssetList

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

FormatAssetList creates a compact list of assets

func FormatDataProductCard added in v0.10.0

func FormatDataProductCard(product *dataproduct.DataProduct, memberAssets []*asset.Asset, totalAssets int, marmotURL string) string

FormatDataProductCard creates a rich data product display including member assets.

func FormatDataProductList added in v0.10.0

func FormatDataProductList(products []*dataproduct.DataProduct, total int, marmotURL string) string

FormatDataProductList creates a compact list of data products.

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 FormatTeamCard added in v0.10.0

func FormatTeamCard(team *Team, members []*TeamMember, marmotURL string) string

FormatTeamCard creates a rich team display including members.

func FormatTeamList added in v0.10.0

func FormatTeamList(teams []*Team, total int, marmotURL string) string

FormatTeamList creates a compact list of teams.

func FormatTermAssets added in v0.10.0

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

FormatTermAssets formats the assets linked to a glossary term.

func FormatTermCard

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

FormatTermCard creates a rich glossary term display

func FormatTermHierarchy added in v0.10.0

func FormatTermHierarchy(heading string, terms []*glossary.GlossaryTerm) string

FormatTermHierarchy formats a set of related terms (ancestors or children) under a heading.

func FormatTermList added in v0.10.0

func FormatTermList(terms []*glossary.GlossaryTerm, total int, marmotURL string) string

FormatTermList creates a compact list of glossary terms.

Types

type DataProductService added in v0.10.0

type DataProductService interface {
	Get(ctx context.Context, id string) (*dataproduct.DataProduct, error)
	List(ctx context.Context, offset, limit int) (*dataproduct.ListResult, error)
	Search(ctx context.Context, filter dataproduct.SearchFilter) (*dataproduct.ListResult, error)
	GetResolvedAssets(ctx context.Context, dataProductID string, limit, offset int) (*dataproduct.ResolvedAssets, error)
	GetDataProductsForAsset(ctx context.Context, assetID string) ([]*dataproduct.DataProduct, error)
}

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 ExploreDataProductsInput added in v0.10.0

type ExploreDataProductsInput struct {
	Query  string   `json:"query,omitempty"`
	ID     string   `json:"id,omitempty"`
	Name   string   `json:"name,omitempty"`
	Tags   []string `json:"tags,omitempty"`
	Limit  int      `json:"limit,omitempty"`
	Offset int      `json:"offset,omitempty"`
}

type ExploreTeamsInput added in v0.10.0

type ExploreTeamsInput struct {
	TeamID   string `json:"team_id,omitempty"`
	TeamName string `json:"team_name,omitempty"`
	UserID   string `json:"user_id,omitempty"`
	Username string `json:"username,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)
	GetChildren(ctx context.Context, parentID string) ([]*glossary.GlossaryTerm, error)
	GetAncestors(ctx context.Context, termID string) ([]*glossary.GlossaryTerm, error)
}

type LookupTermInput

type LookupTermInput struct {
	Query        string `json:"query,omitempty"`
	TermID       string `json:"term_id,omitempty"`
	ParentTermID string `json:"parent_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,
	dataProductService DataProductService,
	lineageService lineage.Service,
	searchService search.Service,
	config *config.Config,
	lookupsRecorder lookups.Recorder,
) *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"`
	Description string   `json:"description,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

type TeamMember added in v0.10.0

type TeamMember struct {
	UserID   string  `json:"user_id"`
	Username string  `json:"username"`
	Name     string  `json:"name"`
	Email    *string `json:"email,omitempty"`
	Role     string  `json:"role"`
}

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)
	ListTeams(ctx context.Context, limit, offset int) ([]*Team, int, error)
	ListMembers(ctx context.Context, teamID string) ([]*TeamMember, error)
	ListUserTeams(ctx context.Context, userID string) ([]*Team, error)
}

type ToolContext

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

ToolContext holds services needed for MCP tools

type TraceLineageInput added in v0.10.0

type TraceLineageInput struct {
	AssetID   string `json:"asset_id,omitempty"`
	MRN       string `json:"mrn,omitempty"`
	Direction string `json:"direction,omitempty"`
	Depth     int    `json:"depth,omitempty"`
}

Jump to

Keyboard shortcuts

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