feat(handlers): enrich semantic error messages with prescriptive tool hints to prevent LLM hallucination traps

This commit is contained in:
Riz Ashraf committed 2026-09-26 08:47:52 +01:00
1 parent cbef7e5291
commit a24ef598a2
4 files changed
+11 -11

No files matched your search

+4 -4
View File
@@ -113,7 +113,7 @@ impl McpTool for DeleteTaskHandler {
][0]
.clone())
} else {
Err("Task not found.".to_string())
Err("Task not found. Please use the list_active_tasks tool to verify the correct task ID.".to_string())
}
}
}
@@ -256,7 +256,7 @@ impl McpTool for UpdateTaskStatusHandler {
} else if found {
Ok("Task status updated.".to_string())
} else {
Err("Task not found.".to_string())
Err("Task not found. Please use the list_active_tasks tool to verify the correct task ID.".to_string())
}
}
}
@@ -336,7 +336,7 @@ impl McpTool for SetAcceptanceCriteriaHandler {
if success {
Ok("Acceptance criteria set successfully.".to_string())
} else {
Err("Task not found.".to_string())
Err("Task not found. Please use the list_active_tasks tool to verify the correct task ID.".to_string())
}
}
}
@@ -444,7 +444,7 @@ impl McpTool for UpdateMilestoneHandler {
if found {
Ok("Milestone updated".to_string())
} else {
Err("Milestone not found".to_string())
Err("Milestone not found. Please verify the milestone ID using list_milestones.".to_string())
}
}
}