tools

package
v0.3.5-0...-81f3c89 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Version = "0.3.2"

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

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

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

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

func (*Server) SessionProject

func (s *Server) SessionProject() string

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

func (*Server) SetSessionRoot

func (s *Server) SetSessionRoot(rootPath string)

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

func (*Server) StartWatcher

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

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

func (*Server) ToolNames

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