Documentation
¶
Index ¶
- Constants
- func AccountURI(name string) string
- func CoreDatabaseURI(database string) string
- func CoreEngineURI(engine string) string
- func DatabaseURI(account, database string) string
- func DocsURI(article string) string
- func EngineURI(account, engine string) string
- func LLMDocsURI(url string) string
- func WithCore() resourceOption
- type Accounts
- type CoreAccounts
- type Databases
- type Docs
- type DocsFS
- type Engines
- type LLMDocs
Constants ¶
const ( DocsArticleOverview = "mcp/overview.md" DocsArticleProof = "mcp/proof.md" DocsArticleReference = "mcp/reference.md" DocsCoreArticleOverview = "mcp/core_overview.md" )
Special articles used by this MCP server.
Variables ¶
This section is empty.
Functions ¶
func AccountURI ¶
AccountURI creates a formatted Firebolt account URI for a given account name.
func CoreDatabaseURI ¶ added in v0.6.0
func CoreEngineURI ¶ added in v0.6.0
CoreEngineURI creates a formatted Firebolt Core engine URI for a given engine name.
func DatabaseURI ¶
DatabaseURI creates a formatted Firebolt database URI for a given account and database name.
func EngineURI ¶
EngineURI creates a formatted Firebolt engine URI for a given account and engine name.
func LLMDocsURI ¶ added in v0.6.0
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
Accounts is a resource template handler for serving Firebolt account information. It interacts with the discovery client to retrieve account data from the Firebolt service.
func NewAccounts ¶
NewAccounts creates and returns a new instance of the Accounts resource handler with the provided discovery client.
func (*Accounts) FetchAccountResources ¶
func (r *Accounts) FetchAccountResources(ctx context.Context, accountName string) (*mcp.ReadResourceResult, error)
FetchAccountResources retrieves account information from the Firebolt service. If a specific account name is specified, it filters for that account; otherwise, it returns all accounts.
func (*Accounts) Handler ¶
func (r *Accounts) Handler(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error)
Handler processes resource requests for account information. It extracts the account parameter and fetches the appropriate account data.
func (*Accounts) ResourceTemplate ¶
func (r *Accounts) ResourceTemplate() *mcp.ResourceTemplate
ResourceTemplate defines the template for account resources. It specifies the URI format, content type, description, and suggested usage.
type CoreAccounts ¶ added in v0.6.0
type CoreAccounts struct {
// contains filtered or unexported fields
}
CoreAccounts is a resource template handler for serving Firebolt Core account information. It interacts with the database pool to retrieve account data from the Firebolt Core.
func NewCoreAccounts ¶ added in v0.6.0
func NewCoreAccounts(dbPool database.Pool) *CoreAccounts
NewCoreAccounts creates and returns a new instance of the CoreAccounts resource handler with the provided dbPool.
func (*CoreAccounts) FetchAccountResources ¶ added in v0.6.0
func (r *CoreAccounts) FetchAccountResources(ctx context.Context) (*mcp.ReadResourceResult, error)
FetchAccountResources retrieves account information from the Firebolt service. If a specific account name is specified, it filters for that account; otherwise, it returns all accounts.
func (*CoreAccounts) Handler ¶ added in v0.6.0
func (r *CoreAccounts) Handler(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error)
Handler processes resource requests for account information. It extracts the account parameter and fetches the appropriate account data.
func (*CoreAccounts) ResourceTemplate ¶ added in v0.6.0
func (r *CoreAccounts) ResourceTemplate() *mcp.ResourceTemplate
ResourceTemplate defines the template for CoreAccount resources. It specifies the URI format, content type, description, and suggested usage.
type Databases ¶
type Databases struct {
// contains filtered or unexported fields
}
Databases is a resource template handler for serving Firebolt database information.
func NewDatabases ¶
NewDatabases creates and returns a new instance of the Databases resource handler.
func (*Databases) FetchDatabaseResources ¶
func (r *Databases) FetchDatabaseResources(ctx context.Context, account, dbName string) (*mcp.ReadResourceResult, error)
FetchDatabaseResources retrieves database information from the Firebolt service. If a specific database is specified, it filters for that database; otherwise, it returns all databases.
func (*Databases) Handler ¶
func (r *Databases) Handler(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error)
Handler processes resource requests for database information. It extracts account and database parameters and fetches the appropriate database data.
func (*Databases) ResourceTemplate ¶
func (r *Databases) ResourceTemplate() *mcp.ResourceTemplate
ResourceTemplate defines the template for database resources. It specifies the URI format, content type, description, and suggested usage.
type Docs ¶
type Docs struct {
// contains filtered or unexported fields
}
Docs is a resource template handler for serving Firebolt documentation articles.
func (*Docs) FetchDocsResources ¶
func (r *Docs) FetchDocsResources(_ context.Context, article string) (*mcp.ReadResourceResult, error)
FetchDocsResources retrieves the content for a specified documentation article. It handles special articles (overview, reference) and regular documentation files.
func (*Docs) Handler ¶
func (r *Docs) Handler(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error)
Handler processes resource requests for documentation articles. It extracts the article parameter and fetches the appropriate documentation content.
func (*Docs) ResourceTemplate ¶
func (r *Docs) ResourceTemplate() *mcp.ResourceTemplate
ResourceTemplate defines the template for documentation resources. It specifies the URI format, content type, description, and suggested usage.
type DocsFS ¶
type DocsFS interface {
fs.ReadDirFS
fs.ReadFileFS
}
DocsFS is an interface that combines the ReadDirFS and ReadFileFS interfaces.
type Engines ¶
type Engines struct {
// contains filtered or unexported fields
}
Engines is a resource template handler for serving Firebolt engine information.
func NewEngines ¶
NewEngines creates and returns a new instance of the Engines resource handler.
func (*Engines) FetchEngineResources ¶
func (r *Engines) FetchEngineResources(ctx context.Context, account, engine string) (*mcp.ReadResourceResult, error)
FetchEngineResources retrieves engine information from the database. If a specific engine is specified, it filters for that engine; otherwise, it returns all engines.
func (*Engines) Handler ¶
func (r *Engines) Handler(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error)
Handler processes resource requests for engine information. It extracts account and engine parameters and fetches the appropriate engine data.
func (*Engines) ResourceTemplate ¶
func (r *Engines) ResourceTemplate() *mcp.ResourceTemplate
ResourceTemplate defines the template for engine resources. It specifies the URI format, content type, description, and suggested usage.
type LLMDocs ¶ added in v0.6.0
type LLMDocs struct {
// contains filtered or unexported fields
}
LLMDocs is a resource template handler for serving Firebolt documentation articles for LLMs.
func NewLLMDocs ¶ added in v0.6.0
func NewLLMDocs() *LLMDocs
NewLLMDocs creates and returns a new instance of the DocsLLM.
func (*LLMDocs) FetchLLMDocsResources ¶ added in v0.6.0
func (r *LLMDocs) FetchLLMDocsResources(ctx context.Context, articleURL *string) (*mcp.ReadResourceResult, error)
FetchLLMDocsResources retrieves the content for a specified documentation article. If the provided articleURL is nil, it returns the documentation index.
func (*LLMDocs) Handler ¶ added in v0.6.0
func (r *LLMDocs) Handler(ctx context.Context, request *mcp.ReadResourceRequest) (*mcp.ReadResourceResult, error)
Handler processes resource requests for LLM documentation articles. It extracts the article URL parameter and fetches the appropriate documentation content.
func (*LLMDocs) ResourceTemplate ¶ added in v0.6.0
func (r *LLMDocs) ResourceTemplate() *mcp.ResourceTemplate
ResourceTemplate defines the template for LLM documentation resources. It specifies the URI format, content type, description, and suggested usage.