tools

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LSPTools

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

func NewLSPTools

func NewLSPTools(lspClient client.LSPClient, workspaceDir string) *LSPTools

func (*LSPTools) Register

func (t *LSPTools) Register(s *server.MCPServer)

func (*LSPTools) SetClientGetter

func (t *LSPTools) SetClientGetter(getter func() client.LSPClient)

func (*LSPTools) SetClientResolver

func (t *LSPTools) SetClientResolver(resolver func(string) (client.LSPClient, error))

SetClientResolver installs a URI→client router used in federation mode. When set, clientForURI delegates to it so each file URI reaches the owning module's lazily-started gopls. When unset, clientForURI falls back to the single shared client (single-module compatibility mode).

func (*LSPTools) SetModuleResolver

func (t *LSPTools) SetModuleResolver(resolver func(string) (string, error))

SetModuleResolver installs a URI→module-root router used in federation mode so per-module commands (go mod tidy, govulncheck, module_graph) run in the correct module directory. When unset, moduleRootForURI falls back to the workspace directory.

func (*LSPTools) SetResetFunc

func (t *LSPTools) SetResetFunc(resetFunc func(error) bool)

func (*LSPTools) SetSearcher

func (t *LSPTools) SetSearcher(searcher search.Searcher)

func (*LSPTools) SetSymbolSearcher

func (t *LSPTools) SetSymbolSearcher(s SymbolSearcher)

SetSymbolSearcher installs the federation-wide symbol searcher used by search_workspace_symbols in federation mode. When unset, the tool falls back to querying the single shared client.

type SymbolSearcher

type SymbolSearcher func(ctx context.Context, query string, opts federation.SymbolSearchOpts) ([]federation.EnrichedSymbol, bool, error)

SymbolSearcher fans a workspace-symbol query out across all federated modules. Set in federation mode; when nil, search_workspace_symbols falls back to the single shared client (single-module compatibility mode).

Jump to

Keyboard shortcuts

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