search

package
v1.87.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package search exposes the universal, topology-free discovery entry point (#645) as the search MCP tool. It is a thin surface over knowledge.Router: it resolves the caller identity from the platform context, runs one query across every searchable source the persona can access, and returns a balanced, grouped-by-source result set plus a coverage summary so the agent sees the shape of the answer space (datasets, memory, insights, assets, prompts, API endpoints, connections) without first having to know the topology. The router owns per-source scope enforcement and the balanced allocator; this package owns only the tool schema and the request/response shape.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toolkit

type Toolkit struct {
	// contains filtered or unexported fields
}

Toolkit registers the search tool over a knowledge.Router.

func New

func New(name string, router *knowledge.Router) *Toolkit

New builds the search toolkit over a router.

func (*Toolkit) Close

func (*Toolkit) Close() error

Close releases resources (none).

func (*Toolkit) Connection

func (*Toolkit) Connection() string

Connection returns the connection name for audit logging (none).

func (*Toolkit) Kind

func (*Toolkit) Kind() string

Kind returns the toolkit kind.

func (*Toolkit) Name

func (t *Toolkit) Name() string

Name returns the toolkit instance name.

func (*Toolkit) RegisterTools

func (t *Toolkit) RegisterTools(s *mcp.Server)

RegisterTools registers the search tool with the MCP server.

func (*Toolkit) SetQueryProvider

func (*Toolkit) SetQueryProvider(query.Provider)

SetQueryProvider is a no-op: search does not execute queries.

func (*Toolkit) SetSemanticProvider

func (*Toolkit) SetSemanticProvider(semantic.Provider)

SetSemanticProvider is a no-op: search reads through the router's providers, not the enrichment semantic provider.

func (*Toolkit) Tools

func (*Toolkit) Tools() []string

Tools returns the list of tool names provided by this toolkit.

Jump to

Keyboard shortcuts

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