tool_connect

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountResourcesFetcher

type AccountResourcesFetcher interface {
	// FetchAccountResources retrieves account information for a specified account name.
	// If accountName is empty, all accessible accounts should be returned.
	FetchAccountResources(ctx context.Context, accountName string) (*mcp.ReadResourceResult, error)
}

AccountResourcesFetcher defines the interface for retrieving account resources. Implementations should provide methods to fetch Firebolt account information.

type Connect

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

Connect represents a tool for fetching and returning Firebolt resource information. It provides hierarchical access to accounts, databases, and engines in the Firebolt system.

func NewConnect

func NewConnect(
	accountsFetcher AccountResourcesFetcher,
	databasesFetcher DatabaseResourcesFetcher,
	enginesFetcher EngineResourcesFetcher,
	docsProof *string,
	disableResources bool,
) *Connect

NewConnect creates a new instance of the Connect tool with the provided resource fetchers. It requires implementations for fetching accounts, databases, and engines.

func (*Connect) Handler

func (t *Connect) Handler() mcp.ToolHandlerFor[Input, *Output]

Handler processes tool invocation requests and returns a comprehensive view of Firebolt resources. It fetches accounts and then concurrently retrieves the databases and engines for each account.

func (*Connect) Register

func (t *Connect) Register(s *mcp.Server)

Register adds the Connect tool to the provided MCP server instance.

func (*Connect) Tool

func (t *Connect) Tool() *mcp.Tool

Tool returns the mcp.Tool definition for the Connect tool. This defines how the tool is represented in the MCP system.

type DatabaseResourcesFetcher

type DatabaseResourcesFetcher interface {
	// FetchDatabaseResources retrieves database information for a specified account and database name.
	// If databaseName is empty, all databases in the account should be returned.
	FetchDatabaseResources(ctx context.Context, accountName, databaseName string) (*mcp.ReadResourceResult, error)
}

DatabaseResourcesFetcher defines the interface for retrieving database resources. Implementations should provide methods to fetch Firebolt database information within an account.

type EngineResourcesFetcher

type EngineResourcesFetcher interface {
	// FetchEngineResources retrieves engine information for a specified account and engine name.
	// If engineName is empty, all engines in the account should be returned.
	FetchEngineResources(ctx context.Context, accountName, engineName string) (*mcp.ReadResourceResult, error)
}

EngineResourcesFetcher defines the interface for retrieving engine resources. Implementations should provide methods to fetch Firebolt engine information within an account.

type Input

type Input struct {
	DocsProof string `` /* 270-byte string literal not displayed */
}

type Output

type Output struct {
	Results []mcp.Content `json:"results"`
}

Jump to

Keyboard shortcuts

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