web

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WebFetchToolName = "web_fetch"
)
View Source
const (
	WebSearchToolName = "web_search"
)

Variables

This section is empty.

Functions

func NewWebFetchTool added in v1.6.16

func NewWebFetchTool() types.Tool

func NewWebSearchTool

func NewWebSearchTool() types.Tool

Types

type McpSearchRequest added in v1.6.16

type McpSearchRequest struct {
	Jsonrpc string `json:"jsonrpc"`
	ID      int    `json:"id"`
	Method  string `json:"method"`
	Params  struct {
		Name      string `json:"name"`
		Arguments struct {
			Query                string `json:"query"`
			NumResults           int    `json:"numResults,omitempty"`
			Livecrawl            string `json:"livecrawl,omitempty"`
			Type                 string `json:"type,omitempty"`
			ContextMaxCharacters int    `json:"contextMaxCharacters,omitempty"`
		} `json:"arguments"`
	} `json:"params"`
}

type McpSearchResponse added in v1.6.16

type McpSearchResponse struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  struct {
		Content []struct {
			Type string `json:"type"`
			Text string `json:"text"`
		} `json:"content"`
	} `json:"result"`
}

type WebFetchTool added in v1.6.16

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

func (*WebFetchTool) Description added in v1.6.16

func (t *WebFetchTool) Description() string

func (*WebFetchTool) Execute added in v1.6.16

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

func (*WebFetchTool) Metadata added in v1.6.16

func (t *WebFetchTool) Metadata() types.ToolMetadata

func (*WebFetchTool) Name added in v1.6.16

func (t *WebFetchTool) Name() string

func (*WebFetchTool) Schema added in v1.6.16

func (t *WebFetchTool) Schema() map[string]interface{}

type WebSearchTool

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

func (*WebSearchTool) Description

func (t *WebSearchTool) Description() string

func (*WebSearchTool) Execute

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

func (*WebSearchTool) Metadata

func (t *WebSearchTool) Metadata() types.ToolMetadata

func (*WebSearchTool) Name

func (t *WebSearchTool) Name() string

func (*WebSearchTool) Schema

func (t *WebSearchTool) Schema() map[string]interface{}

Jump to

Keyboard shortcuts

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