Documentation
¶
Index ¶
- Constants
- type Tool
- func (g *Tool) BackfillInput(ctx context.Context, input map[string]any) map[string]any
- func (g *Tool) Call(ctx context.Context, input tool.CallInput, permissionCheck types.CanUseToolFn) (tool.CallResult, error)
- func (g *Tool) CheckPermissions(ctx context.Context, input map[string]any, toolCtx tool.ToolUseContext) types.PermissionResult
- func (g *Tool) Definition() tool.Definition
- func (g *Tool) Description(ctx context.Context) (string, error)
- func (g *Tool) FormatResult(data any) string
- func (g *Tool) GetWorkingDir() string
- func (g *Tool) IsConcurrencySafe(input map[string]any) bool
- func (g *Tool) IsEnabled() bool
- func (g *Tool) IsReadOnly(input map[string]any) bool
- func (g *Tool) SetWorkingDir(dir string)
- func (g *Tool) ValidateInput(ctx context.Context, input map[string]any) (map[string]any, error)
Constants ¶
View Source
const ( // MaxResults is the maximum number of files to return MaxResults = 100 // MaxResultSizeBytes is the maximum total size in bytes for all results MaxResultSizeBytes = 1024 * 1024 // 1MB )
View Source
const ( // ToolName is the name of the glob tool ToolName = "glob" // SearchHint is a hint for tool search functionality. SearchHint = "find files using glob patterns" // ToolDescription is the human-readable description of what the glob tool does ToolDescription = `` /* 1472-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool implements the glob tool for finding files by pattern
func (*Tool) BackfillInput ¶
BackfillInput enriches a shallow clone of the parsed input with derived fields.
func (*Tool) Call ¶
func (g *Tool) Call( ctx context.Context, input tool.CallInput, permissionCheck types.CanUseToolFn, ) (tool.CallResult, error)
Call executes the tool
func (*Tool) CheckPermissions ¶
func (g *Tool) CheckPermissions(ctx context.Context, input map[string]any, toolCtx tool.ToolUseContext) types.PermissionResult
CheckPermissions performs glob-specific permission checks before the global pipeline.
func (*Tool) Definition ¶
func (g *Tool) Definition() tool.Definition
Definition returns the tool definition
func (*Tool) Description ¶
Description returns the tool description
func (*Tool) FormatResult ¶
FormatResult serialises the tool output into the tool_result content string.
func (*Tool) GetWorkingDir ¶
GetWorkingDir returns the current working directory
func (*Tool) IsConcurrencySafe ¶
IsConcurrencySafe reports that glob searches can run concurrently.
func (*Tool) IsReadOnly ¶
IsReadOnly reports that glob does not modify state.
func (*Tool) SetWorkingDir ¶
SetWorkingDir sets the working directory for the tool
Click to show internal directories.
Click to hide internal directories.