Help us shape the future of Go! Take the 2026 Go Developer Survey

tools

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.2.0"

Version is the current release version, referenced by MCP handshake and update checker.

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(r *store.StoreRouter) *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) Router added in v0.2.0

func (s *Server) Router() *store.StoreRouter

Router returns the underlying StoreRouter for direct access (e.g. CLI mode).

func (*Server) SessionProject added in v0.2.0

func (s *Server) SessionProject() string

SessionProject returns the auto-detected session project name (may be empty).

func (*Server) SetSessionRoot added in v0.2.0

func (s *Server) SetSessionRoot(rootPath string)

SetSessionRoot sets the session root path directly (for CLI mode).

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