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[ConnectInput, *ConnectOutput]
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 ConnectInput ¶ added in v0.4.1
type ConnectInput struct {
DocsProof string `` /* 251-byte string literal not displayed */
}
type ConnectOutput ¶ added in v0.4.1
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 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() mcp.ToolHandlerFor[DocsInput, *DocsOutput]
type DocsInput ¶ added in v0.4.1
type DocsInput struct {
ArticlesIDs []string `json:"articles,omitempty" jsonschema:"Identifiers of the articles to fetch from Firebolt documentation"`
}
type DocsOutput ¶ added in v0.4.1
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.ReadResourceResult, 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.ReadResourceResult, 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() mcp.ToolHandlerFor[QueryInput, *QueryOutput]
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
type QueryInput ¶ added in v0.4.1
type QueryInput struct {
Query string `json:"query" jsonschema:"SQL query to execute"`
Account string `json:"account" jsonschema:"Name of the Firebolt account to connect to"`
Database string `` /* 205-byte string literal not displayed */
Engine string `` /* 423-byte string literal not displayed */
}