Documentation
¶
Index ¶
- func AllTools() (res []llm.Tool)
- func Bash(input BashInput) string
- func Cat(input CatInput) string
- func Create(input CreateInput) (string, error)
- func Git(input GitInput) string
- func Insert(input InsertInput) (string, error)
- func ListFiles(input FileListInput) string
- func NewLSPAgentTool(ctx context.Context, command string, root string) ([]llm.Tool, func(), error)
- func NewMcpAgentTool(ctx context.Context, command string, args []string) ([]llm.Tool, func(), error)
- func ProcessParams(callback any, cb func(name string, t reflect.Type, desc string))
- func Skill(input SkillInput) string
- func SkillToolDescription() string
- func ToAgentTool[I any](name string, desc string, f func(I) (string, error)) llm.Tool
- type BashInput
- type CatInput
- type CreateInput
- type FileListInput
- type GitInput
- type InsertInput
- type LSPServer
- type McpAgentTool
- type SkillInput
- type SymbolInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(input CreateInput) (string, error)
func Insert ¶
func Insert(input InsertInput) (string, error)
func ListFiles ¶
func ListFiles(input FileListInput) string
func NewLSPAgentTool ¶
func NewMcpAgentTool ¶
func ProcessParams ¶
func Skill ¶
func Skill(input SkillInput) string
Skill loads the named skill and returns its instructions.
func SkillToolDescription ¶
func SkillToolDescription() string
SkillToolDescription returns the dynamic description for the Skill tool, including the catalog of currently available skills.
Types ¶
type BashInput ¶
type BashInput struct {
Command string `json:"command" description:"The bash command to execute"`
}
type CatInput ¶
type CatInput struct {
Path string `json:"path" description:"The path of the file to read"`
Offset int `json:"offset" description:"Optional line number to start reading from (0-based)"`
Limit int `json:"limit" description:"Optional maximum number of lines to read"`
}
CatInput defines the input parameters for the Cat tool
type CreateInput ¶
type FileListInput ¶
type FileListInput struct {
Path string `json:"path" description:"The directory path to list files from"`
Recursive bool `json:"recursive" description:"Whether to list files recursively (including subdirectories)"`
Pattern string `json:"pattern" description:"Optional glob pattern to filter files (e.g., *.go, *.md)"`
}
FileListInput defines the input parameters for the Files tool
type GitInput ¶
type GitInput struct {
Command string `json:"command" description:"The git command to execute including git itself as. For example: git status"`
}
type InsertInput ¶
type InsertInput struct {
Path string `json:"path" description:"The path of the file where the content should be written to."`
InsertLine int `json:"insert_line" description:"The line number at which to insert the new content (0-based index)."`
NewStr string `json:"new_str" description:"The file content to write to the specified path"`
}
type LSPServer ¶
type LSPServer struct {
// contains filtered or unexported fields
}
func NewLSPServer ¶
type McpAgentTool ¶
type McpAgentTool struct {
// contains filtered or unexported fields
}
func NewMcpAgentToolMethod ¶
func NewMcpAgentToolMethod(session *mcp.ClientSession, tool *mcp.Tool) *McpAgentTool
func (McpAgentTool) Info ¶
func (m McpAgentTool) Info() llm.ToolInfo
func (McpAgentTool) Run ¶
func (m McpAgentTool) Run(ctx context.Context, params llm.ToolCall) (llm.ToolResult, error)
type SkillInput ¶
type SkillInput struct {
Name string `json:"name" description:"The exact name of the skill to load, as listed in the tool description."`
}
SkillInput defines the input parameters for the Skill tool.
type SymbolInput ¶
type SymbolInput struct {
Paths []string `json:"path" description:"Relative path of the source files from the actual current directory, to list all including symbols."`
}
Click to show internal directories.
Click to hide internal directories.