resources

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
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

func AccountURI(name string) string

AccountURI creates a formatted Firebolt account URI for a given account name.

func CoreDatabaseURI added in v0.6.0

func CoreDatabaseURI(database string) string

func CoreEngineURI added in v0.6.0

func CoreEngineURI(engine string) string

CoreEngineURI creates a formatted Firebolt Core engine URI for a given engine name.

func DatabaseURI

func DatabaseURI(account, database string) string

DatabaseURI creates a formatted Firebolt database URI for a given account and database name.

func DocsURI

func DocsURI(article string) string

DocsURI creates a formatted Firebolt documentation URI for a given article.

func EngineURI

func EngineURI(account, engine string) string

EngineURI creates a formatted Firebolt engine URI for a given account and engine name.

func LLMDocsURI added in v0.6.0

func LLMDocsURI(url string) string

func WithCore added in v0.6.0

func WithCore() resourceOption

WithCore is an option func that sets the resource as a Firebolt Core resource.

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

func NewAccounts(discoveryClient discovery.Client) *Accounts

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

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

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

func NewDatabases(dbPool database.Pool, opts ...resourceOption) *Databases

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

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 NewDocs

func NewDocs(docsFS DocsFS, proofSecret string) *Docs

NewDocs creates and returns a new instance of the Docs.

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

func NewEngines(dbPool database.Pool, opts ...resourceOption) *Engines

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.

Jump to

Keyboard shortcuts

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