mcp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetFileByIDArgs

type GetFileByIDArgs struct {
	ID string `json:"id" jsonschema:"The Google Drive file ID"`
}

type GetFileByIDResult

type GetFileByIDResult struct {
	File *db.File `json:"file"`
}

type GetFileContentArgs

type GetFileContentArgs struct {
	FileID string `json:"file_id" jsonschema:"The Google Drive file ID"`
}

type GetFileContentResult

type GetFileContentResult struct {
	Content *db.Content `json:"content"`
}

type GetSyncStatusResult

type GetSyncStatusResult struct {
	Log *db.SyncLog `json:"log"`
}

type ListFolderArgs

type ListFolderArgs struct {
	Path string `json:"path" jsonschema:"The folder path to list files from"`
}

Tool input structs

type ListFolderResult

type ListFolderResult struct {
	Files []*db.File `json:"files"`
}

Tool result structs

type MCPWorker

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

MCPWorker implements the Worker interface for the Model Context Protocol server.

func NewWorker

func NewWorker(cfg *config.Config, db *sql.DB) *MCPWorker

NewWorker creates a new MCPWorker instance.

func (*MCPWorker) Name

func (w *MCPWorker) Name() string

Name returns the unique name of the worker.

func (*MCPWorker) Start

func (w *MCPWorker) Start(ctx context.Context) error

Start begins the worker's execution. It starts the MCP server on the configured port.

func (*MCPWorker) Stop

func (w *MCPWorker) Stop() error

Stop gracefully shuts down the worker.

type SearchFilesArgs

type SearchFilesArgs struct {
	Query string `json:"query" jsonschema:"The search query (matches name or folder path)"`
}

type SearchFilesResult

type SearchFilesResult struct {
	Files []*db.File `json:"files"`
}

type Server

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

Server implements the MCP server over SSE.

func NewServer

func NewServer(name, version string, database *sql.DB) *Server

NewServer creates a new MCP Server instance.

func (*Server) Start

func (s *Server) Start(port int) error

Start launches the HTTP server with SSE support.

func (*Server) Stop

func (s *Server) Stop() error

Stop gracefully shuts down the HTTP server.

Jump to

Keyboard shortcuts

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