Documentation
¶
Overview ¶
Package sqlitestore implements a SQLite-based ToolStore for search over MCP tool metadata. It uses FTS5 for full-text search and optional embedding-based semantic search for hybrid retrieval.
Index ¶
Constants ¶
View Source
const ( // DefaultMaxToolsToReturn is the maximum number of results returned to the caller. DefaultMaxToolsToReturn = 8 // DefaultHybridSemanticToolsRatio controls the proportion of semantic vs FTS5 // results in hybrid mode: 0 = all FTS5, 1 = all semantic. DefaultHybridSemanticToolsRatio = 0.5 // DefaultSemanticDistanceThreshold is the maximum cosine distance for semantic search results. // Results with distance > threshold are filtered out in searchSemantic only. // Cosine distance: 0 = identical, 2 = opposite. DefaultSemanticDistanceThreshold = 1.0 )
Default values for configurable search parameters.
Variables ¶
This section is empty.
Functions ¶
func NewSQLiteToolStore ¶
func NewSQLiteToolStore(embeddingClient types.EmbeddingClient, cfg *types.OptimizerConfig) (types.ToolStore, error)
NewSQLiteToolStore creates a new ToolStore backed by a shared in-memory SQLite database. All callers of this constructor share the same database, which is the intended production behavior (one shared store per server). If embeddingClient is non-nil, semantic search is enabled alongside FTS5. If cfg is non-nil, its search parameters override the defaults; nil values use defaults.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.