fetch_types.go

 1package tools
 2
 3// AgenticFetchToolName is the name of the agentic fetch tool.
 4const AgenticFetchToolName = "agentic_fetch"
 5
 6// WebFetchToolName is the name of the web_fetch tool.
 7const WebFetchToolName = "web_fetch"
 8
 9// LargeContentThreshold is the size threshold for saving content to a file.
10const LargeContentThreshold = 50000 // 50KB
11
12// AgenticFetchParams defines the parameters for the agentic fetch tool.
13type AgenticFetchParams struct {
14	URL    string `json:"url" description:"The URL to fetch content from"`
15	Prompt string `json:"prompt" description:"The prompt to run on the fetched content"`
16}
17
18// AgenticFetchPermissionsParams defines the permission parameters for the agentic fetch tool.
19type AgenticFetchPermissionsParams struct {
20	URL    string `json:"url"`
21	Prompt string `json:"prompt"`
22}
23
24// WebFetchParams defines the parameters for the web_fetch tool.
25type WebFetchParams struct {
26	URL string `json:"url" description:"The URL to fetch content from"`
27}
28
29// FetchParams defines the parameters for the simple fetch tool.
30type FetchParams struct {
31	URL     string `json:"url" description:"The URL to fetch content from"`
32	Format  string `json:"format" description:"The format to return the content in (text, markdown, or html)"`
33	Timeout int    `json:"timeout,omitempty" description:"Optional timeout in seconds (max 120)"`
34}
35
36// FetchPermissionsParams defines the permission parameters for the simple fetch tool.
37type FetchPermissionsParams struct {
38	URL     string `json:"url"`
39	Format  string `json:"format"`
40	Timeout int    `json:"timeout,omitempty"`
41}