on main help sign in
fix: reduce `fetch` and `view` tools truncation size to 100KB
9d555a7Andrey Nering
internal/agent/tools/fetch.go+1−1
@@ -18,7 +18,7 @@ import (
18
18
19const (
19const (
20 FetchToolName = "fetch"
20 FetchToolName = "fetch"
21− MaxFetchSize = 1 * 1024 * 1024 // 1MB
21+ MaxFetchSize = 100 * 1024 // 100KB
22)
22)
23
23
24//go:embed fetch.md
24//go:embed fetch.md
internal/agent/tools/fetch.md+2−2
@@ -1,4 +1,4 @@
1−Fetch raw content from a URL as text, markdown, or html (max 5MB); no AI processing. For analysis or extraction use agentic_fetch.
1+Fetch raw content from a URL as text, markdown, or html (max 100KB); no AI processing. For analysis or extraction use agentic_fetch.
2
2
3<when_to_use>
3<when_to_use>
4Use this tool when you need:
4Use this tool when you need:
@@ -29,7 +29,7 @@ DO NOT use this tool when you need to:
29</features>
29</features>
30
30
31<limitations>
31<limitations>
32−- Max response size: 5MB
32+- Max response size: 100KB
33- Only supports HTTP and HTTPS protocols
33- Only supports HTTP and HTTPS protocols
34- Cannot handle authentication or cookies
34- Cannot handle authentication or cookies
35- Some websites may block automated requests
35- Some websites may block automated requests
internal/agent/tools/view.go+1−1
@@ -53,7 +53,7 @@ type ViewResponseMetadata struct {
53
53
54const (
54const (
55 ViewToolName = "view"
55 ViewToolName = "view"
56− MaxViewSize = 1 * 1024 * 1024 // 1MB
56+ MaxViewSize = 100 * 1024 // 100KB
57 DefaultReadLimit = 2000
57 DefaultReadLimit = 2000
58 MaxLineLength = 2000
58 MaxLineLength = 2000
59)
59)
internal/agent/tools/view.md+2−2
@@ -1,4 +1,4 @@
1−Read a file by path with line numbers; supports offset and line limit (default 2000, max 5MB); renders images (PNG, JPEG, GIF, BMP, SVG, WebP); use ls for directories.
1+Read a file by path with line numbers; supports offset and line limit (default 2000, max 100KB); renders images (PNG, JPEG, GIF, BMP, SVG, WebP); use ls for directories.
2
2
3<usage>
3<usage>
4- Provide file path to read
4- Provide file path to read
@@ -18,7 +18,7 @@ Read a file by path with line numbers; supports offset and line limit (default 2
18</features>
18</features>
19
19
20<limitations>
20<limitations>
21−- Max file size: 5MB
21+- Max file size: 100KB
22- Default limit: 2000 lines
22- Default limit: 2000 lines
23- Lines >2000 chars truncated
23- Lines >2000 chars truncated
24- Binary files (except images) cannot be displayed
24- Binary files (except images) cannot be displayed