tools

package
v1.12.21 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPackageInsightsTool

func NewPackageInsightsTool(driver mcp.Driver) *packageInsightsTool

NewPackageInsightsTool creates a new instance of PackageInsightsTool

func NewPackageMalwareTool

func NewPackageMalwareTool(driver mcp.Driver) *packageMalwareTool

NewPackageMalwareTool creates a new instance of PackageMalwareTool

func NewPackageRegistryTool

func NewPackageRegistryTool(driver mcp.Driver) *packageRegistryTool

func NewVetSQLQueryTool added in v1.12.0

func NewVetSQLQueryTool(dbPath string) (*vetSqlQueryTool, error)

NewVetSQLQueryTool creates a new vet SQL query tool. The purpose of this tool is to provide agents access to vet SQLite3 report data through SQL queries.

func RegisterAll

func RegisterAll(server server.McpServer, driver mcp.Driver) error

Types

type MockDriver

type MockDriver struct {
	mock.Mock
}

MockDriver is a reusable mock implementation of mcp.Driver that can be used across all tool tests

func NewMockDriver

func NewMockDriver() *MockDriver

NewMockDriver creates a new MockDriver instance

func (*MockDriver) GetPackageAvailableVersions

func (m *MockDriver) GetPackageAvailableVersions(ctx context.Context, p *packagev1.Package) ([]*packagev1.PackageVersion, error)

func (*MockDriver) GetPackageLatestVersion

func (m *MockDriver) GetPackageLatestVersion(ctx context.Context, p *packagev1.Package) (*packagev1.PackageVersion, error)

func (*MockDriver) GetPackageVersionLicenseInfo

func (m *MockDriver) GetPackageVersionLicenseInfo(ctx context.Context, pv *packagev1.PackageVersion) (*packagev1.LicenseMetaList, error)

func (*MockDriver) GetPackageVersionMalwareReport

func (m *MockDriver) GetPackageVersionMalwareReport(ctx context.Context, pv *packagev1.PackageVersion) (*malysisv1pb.Report, error)

func (*MockDriver) GetPackageVersionPopularity

func (m *MockDriver) GetPackageVersionPopularity(ctx context.Context, pv *packagev1.PackageVersion) ([]*packagev1.ProjectInsight, error)

func (*MockDriver) GetPackageVersionVulnerabilities

func (m *MockDriver) GetPackageVersionVulnerabilities(ctx context.Context, pv *packagev1.PackageVersion) ([]*vulnerabilityv1.Vulnerability, error)

Jump to

Keyboard shortcuts

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