tool

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bash

func Bash(command string) (string, error)

Bash executes a shell command and returns its combined stdout and stderr. This is the universal tool for: - File operations (cat, grep, echo, find, etc.) - Script execution (python3, node, npx tsx, bash) - Git operations - Package management (npm, pip, etc.)

func BashWithContext added in v1.7.2

func BashWithContext(ctx context.Context, command string) (string, error)

BashWithTimeout executes a shell command with a custom timeout.

func DefineBashTool

func DefineBashTool() types.Tool

DefineBashTool name: bash

func DefineHTTPTool

func DefineHTTPTool() types.Tool

DefineHTTPTool name: http

func DefineReadLocal

func DefineReadLocal(dirs ...fs.FS) types.Tool

func DefineTavilySearch

func DefineTavilySearch() types.Tool

func ReadFS

func ReadFS(root fs.FS, path string) (rw string, e error)

func TavilySearch

func TavilySearch(ctx context.Context, query string) (string, error)

TavilySearch performs a web search using the Tavily API.

func TavilySearchWithLimit

func TavilySearchWithLimit(ctx context.Context, query string, maxResults int) (string, error)

TavilySearchWithLimit performs a web search using the Tavily API with a custom result limit.

func TavilySearchWithLimitAndURL

func TavilySearchWithLimitAndURL(ctx context.Context, query string, maxResults int, apiURL string) (string, error)

TavilySearchWithLimitAndURL performs a web search using the Tavily API with a custom result limit and URL (for testing).

Types

This section is empty.

Jump to

Keyboard shortcuts

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