feat(handlers): enrich semantic error messages with prescriptive tool hints to prevent LLM hallucination traps
This commit is contained in:
1 parent
cbef7e5291
commit
a24ef598a2
4 files changed
+11
-11
No files matched your search
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user