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.ResourceContents, 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(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
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.
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.ResourceContents, error) }
DatabaseResourcesFetcher defines the interface for retrieving database resources. Implementations should provide methods to fetch Firebolt database information within an account.
type Docs ¶
type Docs struct {
// contains filtered or unexported fields
}
Docs represents a tool for fetching and returning Firebolt documentation. It provides access to documentation articles that explain Firebolt concepts and functionality.
func NewDocs ¶
func NewDocs(docsFetcher DocsResourcesFetcher, disableResources bool) *Docs
NewDocs creates a new instance of the Docs tool with the provided documentation fetcher. It requires an implementation for fetching documentation articles.
func (*Docs) Handler ¶
func (t *Docs) Handler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
Handler processes tool invocation requests and returns Firebolt documentation articles. If no specific articles are requested, it returns a set of default articles including an overview, a proof of documentation reading (needed for the connect tool), and a reference article. If specific articles are requested via the "articles" parameter, it fetches and returns those.
type DocsResourcesFetcher ¶
type DocsResourcesFetcher interface { // FetchDocsResources retrieves documentation content for a specified article. // If article is empty, the implementation should determine an appropriate default behavior. FetchDocsResources(_ context.Context, article string) ([]mcp.ResourceContents, error) }
DocsResourcesFetcher defines the interface for retrieving documentation resources. Implementations should provide methods to fetch Firebolt documentation.
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.ResourceContents, error) }
EngineResourcesFetcher defines the interface for retrieving engine resources. Implementations should provide methods to fetch Firebolt engine information within an account.
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query represents a tool for executing SQL queries against Firebolt databases. It handles connecting to the appropriate account, database, and engine before executing the query and returning results.
func NewQuery ¶
NewQuery creates a new instance of the Query tool with the provided database connection pool. The connection pool is responsible for managing connections to different Firebolt account/database/engine combinations.
func (*Query) Handler ¶
func (t *Query) Handler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
Handler processes tool invocation requests and executes SQL queries against Firebolt. It performs the following steps: 1. Extracts and validates required/optional parameters from the request 2. Acquires a database connection from the pool using the specified parameters 3. Executes the query against the database 4. Returns the query results as JSON