docs: update human and LLM docs and enhance tool/list schemas with actionable next steps
This commit is contained in:
1 parent
961abb01e7
commit
4b307b55b9
12 files changed
+307
-336
No files matched your search
@@ -532,7 +532,7 @@ impl McpTool for TasksHandler {
|
||||
match req.action {
|
||||
TaskAction::Add => {
|
||||
let title = req.title.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("title is required for 'add' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'title' for action 'add'. Next step: Provide non-empty 'title' string in request and retry.".to_string())
|
||||
})?;
|
||||
let description = req.description.unwrap_or_default();
|
||||
let add_args = serde_json::json!({
|
||||
@@ -546,10 +546,10 @@ impl McpTool for TasksHandler {
|
||||
}
|
||||
TaskAction::Update => {
|
||||
let id = req.id.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("id is required for 'update' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'id' for action 'update'. Next step: Provide task 'id' string in request and retry.".to_string())
|
||||
})?;
|
||||
let status = req.status.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("status is required for 'update' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'status' for action 'update'. Next step: Provide valid 'status' ('pending', 'completed', or 'cancelled') in request and retry.".to_string())
|
||||
})?;
|
||||
let update_args = serde_json::json!({
|
||||
"id": id,
|
||||
@@ -559,7 +559,7 @@ impl McpTool for TasksHandler {
|
||||
}
|
||||
TaskAction::Delete => {
|
||||
let id = req.id.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("id is required for 'delete' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'id' for action 'delete'. Next step: Provide task 'id' string in request and retry.".to_string())
|
||||
})?;
|
||||
let del_args = serde_json::json!({
|
||||
"id": id,
|
||||
@@ -576,10 +576,10 @@ impl McpTool for TasksHandler {
|
||||
}
|
||||
TaskAction::SetCriteria => {
|
||||
let id = req.id.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("id is required for 'set_criteria' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'id' for action 'set_criteria'. Next step: Provide task 'id' string in request and retry.".to_string())
|
||||
})?;
|
||||
let criteria = req.criteria.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("criteria array is required for 'set_criteria' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'criteria' for action 'set_criteria'. Next step: Provide array of acceptance criteria descriptions in request and retry.".to_string())
|
||||
})?;
|
||||
let set_args = serde_json::json!({
|
||||
"id": id,
|
||||
@@ -589,7 +589,7 @@ impl McpTool for TasksHandler {
|
||||
}
|
||||
TaskAction::Verify => {
|
||||
let id = req.id.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("id is required for 'verify' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'id' for action 'verify'. Next step: Provide task 'id' string in request and retry.".to_string())
|
||||
})?;
|
||||
let verify_args = serde_json::json!({
|
||||
"id": id,
|
||||
@@ -620,7 +620,7 @@ impl McpTool for MilestonesHandler {
|
||||
match req.action {
|
||||
MilestoneAction::Add => {
|
||||
let title = req.title.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("title is required for 'add' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'title' for action 'add'. Next step: Provide non-empty 'title' string in request and retry.".to_string())
|
||||
})?;
|
||||
let add_args = serde_json::json!({
|
||||
"title": title,
|
||||
@@ -630,10 +630,10 @@ impl McpTool for MilestonesHandler {
|
||||
}
|
||||
MilestoneAction::Update => {
|
||||
let id = req.id.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("id is required for 'update' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'id' for action 'update'. Next step: Provide milestone 'id' string in request and retry.".to_string())
|
||||
})?;
|
||||
let status = req.status.ok_or_else(|| {
|
||||
crate::error::AppError::Internal("status is required for 'update' action".to_string())
|
||||
crate::error::AppError::Internal("Missing required parameter 'status' for action 'update'. Next step: Provide milestone 'status' in request and retry.".to_string())
|
||||
})?;
|
||||
let update_args = serde_json::json!({
|
||||
"id": id,
|
||||
|
||||
Reference in new issue
Block a user