server

package
v0.0.0-...-b0e2820 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteArgs

type DeleteArgs struct {
	Source string `json:"source" jsonschema:"Source to delete (file path or URL)"`
}

DeleteArgs represents arguments for the delete tool

type IndexArgs

type IndexArgs struct {
	FilePath string `json:"file_path,omitempty" jsonschema:"Path to file to index"`
	URL      string `json:"url,omitempty" jsonschema:"URL to fetch and index"`
	Content  string `json:"content,omitempty" jsonschema:"Direct content to index (requires source)"`
	Source   string `json:"source,omitempty" jsonschema:"Source identifier when using content parameter"`
	Reindex  bool   `json:"reindex,omitempty" jsonschema:"Force re-index if already indexed (default: false)"`
}

IndexArgs represents arguments for the index tool

type ListArgs

type ListArgs struct {
	SourceType string `json:"source_type,omitempty" jsonschema:"Filter by source type: 'file' or 'url' (empty for all)"`
}

ListArgs represents arguments for the list tool

type SearchArgs

type SearchArgs struct {
	Query        string   `json:"query" jsonschema:"Search query"`
	TopK         int      `json:"top_k,omitempty" jsonschema:"Number of results to return (default: 5)"`
	MinScore     *float64 `json:"min_score,omitempty" jsonschema:"Minimum similarity score 0-1 (default: 0.3)"`
	SourceFilter string   `json:"source_filter,omitempty" jsonschema:"Filter results to specific source (file path or URL)"`
}

SearchArgs represents arguments for the search tool

type Server

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

Server represents the MCP server

func NewServer

func NewServer(searchService *search.Service) *Server

NewServer creates a new MCP server

func (*Server) Close

func (s *Server) Close() error

Close cleans up server resources

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the MCP server on stdio transport

Jump to

Keyboard shortcuts

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