tools

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCollectionStatus

func CheckCollectionStatus(ctx context.Context, mem memory.LongTermMemory, collectionName, workspacePath string) (string, error)

CheckCollectionStatus verifies if a collection exists and has data. Returns an error message if the collection is missing or empty, nil otherwise.

func CheckSearchResults

func CheckSearchResults(resultCount int, collectionName, workspacePath string) (string, error)

CheckSearchResults verifies if search returned any results. Returns an error message if no results found, nil otherwise.

Types

type ExportedSymbol

type ExportedSymbol struct {
	Name        string
	Type        string
	Signature   string
	Description string
	FilePath    string
	StartLine   int
	Package     string
	Language    string
}

type FindImplementationsTool

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

FindImplementationsTool finds where a function/interface is used or implemented

func NewFindImplementationsTool

func NewFindImplementationsTool(ltm memory.LongTermMemory, embedder llm.Provider) *FindImplementationsTool

NewFindImplementationsTool creates a new implementations finder tool

func (*FindImplementationsTool) Description

func (t *FindImplementationsTool) Description() string

func (*FindImplementationsTool) Execute

func (t *FindImplementationsTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)

func (*FindImplementationsTool) Name

func (t *FindImplementationsTool) Name() string

func (*FindImplementationsTool) SetWorkspaceManager

func (t *FindImplementationsTool) SetWorkspaceManager(wm *workspace.Manager)

SetWorkspaceManager sets the workspace manager for workspace-aware searching

type FindTypeDefinitionTool

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

FindTypeDefinitionTool finds and returns complete type definitions (struct/interface)

func NewFindTypeDefinitionTool

func NewFindTypeDefinitionTool(ltm memory.LongTermMemory, embedder llm.Provider) *FindTypeDefinitionTool

NewFindTypeDefinitionTool creates a new type definition finder tool

func (*FindTypeDefinitionTool) Description

func (t *FindTypeDefinitionTool) Description() string

func (*FindTypeDefinitionTool) Execute

func (t *FindTypeDefinitionTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)

func (*FindTypeDefinitionTool) Name

func (t *FindTypeDefinitionTool) Name() string

func (*FindTypeDefinitionTool) SetWorkspaceManager

func (t *FindTypeDefinitionTool) SetWorkspaceManager(wm *workspace.Manager)

SetWorkspaceManager sets the workspace manager for workspace-aware searching

type GetCodeContextTool

type GetCodeContextTool struct{}

GetCodeContextTool reads code from a file with surrounding context lines

func NewGetCodeContextTool

func NewGetCodeContextTool() *GetCodeContextTool

NewGetCodeContextTool creates a new code context tool

func (*GetCodeContextTool) Description

func (t *GetCodeContextTool) Description() string

func (*GetCodeContextTool) Execute

func (t *GetCodeContextTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)

func (*GetCodeContextTool) Name

func (t *GetCodeContextTool) Name() string

type GetFunctionDetailsTool

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

GetFunctionDetailsTool returns complete details about a function or method

func NewGetFunctionDetailsTool

func NewGetFunctionDetailsTool(ltm memory.LongTermMemory, embedder llm.Provider) *GetFunctionDetailsTool

NewGetFunctionDetailsTool creates a new function details tool

func (*GetFunctionDetailsTool) Description

func (t *GetFunctionDetailsTool) Description() string

func (*GetFunctionDetailsTool) Execute

func (t *GetFunctionDetailsTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)

func (*GetFunctionDetailsTool) Name

func (t *GetFunctionDetailsTool) Name() string

func (*GetFunctionDetailsTool) SetWorkspaceManager

func (t *GetFunctionDetailsTool) SetWorkspaceManager(wm *workspace.Manager)

SetWorkspaceManager sets the workspace manager for workspace-aware searching

type HybridSearchTool

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

HybridSearchTool combines basic lexical matching with semantic scoring from vector search to get more relevant results when exact matches exist.

func NewHybridSearchTool

func NewHybridSearchTool(mem memory.LongTermMemory, embedder llm.Provider) *HybridSearchTool

NewHybridSearchTool creates a new hybrid search tool. Accepts the main code memory and embedding provider.

func (*HybridSearchTool) Description

func (t *HybridSearchTool) Description() string

Description provides a description for the tool.

func (*HybridSearchTool) Execute

func (t *HybridSearchTool) Execute(ctx context.Context, params map[string]interface{}) (string, error)

Execute runs the hybrid search.

func (*HybridSearchTool) Name

func (t *HybridSearchTool) Name() string

Name returns the MCP tool name.

func (*HybridSearchTool) SetWorkspaceManager

func (t *HybridSearchTool) SetWorkspaceManager(wm *workspace.Manager)

SetWorkspaceManager sets the workspace manager for workspace-aware searching

type Implementation

type Implementation struct {
	Name        string
	Type        string
	Package     string
	FilePath    string
	StartLine   int
	EndLine     int
	Occurrences int
	Snippet     string
}

type IndexWorkspaceTool

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

IndexWorkspaceTool indexes a workspace for code search

func NewIndexWorkspaceTool

func NewIndexWorkspaceTool(wm *workspace.Manager) *IndexWorkspaceTool

NewIndexWorkspaceTool creates a new index workspace tool

func (*IndexWorkspaceTool) Description

func (t *IndexWorkspaceTool) Description() string

Description returns the tool description

func (*IndexWorkspaceTool) Execute

func (t *IndexWorkspaceTool) Execute(ctx context.Context, params map[string]interface{}) (string, error)

Execute indexes the workspace

func (*IndexWorkspaceTool) Name

func (t *IndexWorkspaceTool) Name() string

Name returns the tool name

type ListPackageExportsTool

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

ListPackageExportsTool lists all exported symbols from a package

func NewListPackageExportsTool

func NewListPackageExportsTool(ltm memory.LongTermMemory, embedder llm.Provider) *ListPackageExportsTool

NewListPackageExportsTool creates a new package exports listing tool

func (*ListPackageExportsTool) Description

func (t *ListPackageExportsTool) Description() string

func (*ListPackageExportsTool) Execute

func (t *ListPackageExportsTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)

func (*ListPackageExportsTool) Name

func (t *ListPackageExportsTool) Name() string

func (*ListPackageExportsTool) SetWorkspaceManager

func (t *ListPackageExportsTool) SetWorkspaceManager(wm *workspace.Manager)

SetWorkspaceManager sets the workspace manager for workspace-aware searching

type SearchDocsTool

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

SearchDocsTool searches the docs (Markdown) vector index

func NewSearchDocsTool

func NewSearchDocsTool(ltm memory.LongTermMemory, embedder llm.Provider) *SearchDocsTool

NewSearchDocsTool creates a new search docs tool

func (*SearchDocsTool) Description

func (t *SearchDocsTool) Description() string

Description returns the tool description

func (*SearchDocsTool) Execute

func (t *SearchDocsTool) Execute(ctx context.Context, params map[string]interface{}) (string, error)

Execute executes a search in the docs index

func (*SearchDocsTool) Name

func (t *SearchDocsTool) Name() string

Name returns the tool name

func (*SearchDocsTool) SetWorkspaceManager

func (t *SearchDocsTool) SetWorkspaceManager(wm *workspace.Manager)

SetWorkspaceManager sets the workspace manager for workspace-aware searching

type SearchLocalIndexTool

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

SearchLocalIndexTool searches the local vector index

func NewSearchLocalIndexTool

func NewSearchLocalIndexTool(ltm memory.LongTermMemory, embedder llm.Provider, additional ...memory.LongTermMemory) *SearchLocalIndexTool

NewSearchLocalIndexTool creates a new search local index tool

func (*SearchLocalIndexTool) Description

func (t *SearchLocalIndexTool) Description() string

Description returns the tool description

func (*SearchLocalIndexTool) Execute

func (t *SearchLocalIndexTool) Execute(ctx context.Context, params map[string]interface{}) (string, error)

Execute executes a search in the local index

func (*SearchLocalIndexTool) Name

func (t *SearchLocalIndexTool) Name() string

Name returns the tool name

func (*SearchLocalIndexTool) SetWorkspaceManager

func (t *SearchLocalIndexTool) SetWorkspaceManager(wm *workspace.Manager)

SetWorkspaceManager sets the workspace manager for workspace-aware searching

Jump to

Keyboard shortcuts

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