diff --git a/internal/agent/tools/tools.go b/internal/agent/tools/tools.go index bf6ed897e8b7acaf071738fa0d3f3cee25981e67..7212a9150c376195b6f8e2b41fd88b6a3372fe64 100644 --- a/internal/agent/tools/tools.go +++ b/internal/agent/tools/tools.go @@ -60,11 +60,11 @@ func GetModelNameFromContext(ctx context.Context) string { } // FirstLineDescription returns just the first non-empty line from the embedded -// markdown description when CRUSH_SHORT_TOOL_DESCRIPTIONS is set, significantly -// reducing token usage. Otherwise returns the full description. +// markdown description. The full description can be used by setting +// CRUSH_SHORT_TOOL_DESCRIPTIONS=0. func FirstLineDescription(content []byte) string { if !testing.Testing() { - if v, _ := strconv.ParseBool(os.Getenv("CRUSH_SHORT_TOOL_DESCRIPTIONS")); !v { + if v, err := strconv.ParseBool(os.Getenv("CRUSH_SHORT_TOOL_DESCRIPTIONS")); err == nil && !v { return strings.TrimSpace(string(content)) } }