(all bool)
| 183 | } |
| 184 | |
| 185 | func (s *Server) handleList(all bool) (*mcp.CallToolResult, any, error) { |
| 186 | tasks, err := s.load() |
| 187 | if err != nil { |
| 188 | return nil, nil, fmt.Errorf("load tasks: %w", err) |
| 189 | } |
| 190 | if tasks == nil { |
| 191 | tasks = devtodo2.NewTaskList() |
| 192 | } |
| 193 | |
| 194 | absPath, _ := filepath.Abs(s.file) |
| 195 | result := ListResult{ |
| 196 | Title: tasks.Title(), |
| 197 | File: absPath, |
| 198 | Tasks: collectTasks(tasks, "", all), |
| 199 | } |
| 200 | |
| 201 | return jsonResult(result) |
| 202 | } |
| 203 | |
| 204 | func (s *Server) handleAdd(text, priority, parent string) (*mcp.CallToolResult, any, error) { |
| 205 | if text == "" { |
no test coverage detected