tools

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server wraps the MCP server with tool handlers.

func NewServer

func NewServer(s *store.Store) *Server

NewServer creates a new MCP server with all tools registered.

func (*Server) CallTool added in v0.1.4

func (s *Server) CallTool(ctx context.Context, name string, argsJSON json.RawMessage) (*mcp.CallToolResult, error)

CallTool invokes a tool handler directly by name, bypassing MCP transport.

func (*Server) MCPServer

func (s *Server) MCPServer() *mcp.Server

MCPServer returns the underlying MCP server.

func (*Server) StartWatcher added in v0.1.2

func (s *Server) StartWatcher(ctx context.Context)

StartWatcher launches the background file-change polling goroutine. It stops when ctx is cancelled.

func (*Server) ToolNames added in v0.1.4

func (s *Server) ToolNames() []string

ToolNames returns all registered tool names in sorted order.

Jump to

Keyboard shortcuts

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