Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/mcp_prompts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ fn get_handoff_command(request: &GetPromptRequestParams, agent: Option<&str>) ->
item_id=<that item's id> (so the reply becomes the next asset version instead of a new \
item) and reply_to=<id of the specific message you're answering>, reusing its \
thread_id.\n\
If the work already lives on some other existing item (not just your \
own inbox reply), pass that item's id as item_id too — omitting it \
always creates a new item, even when one covering this work already \
exists. And if this is just a plain-text status update with no \
versioned artifact to attach, skip `handoff` entirely: call `comment` \
(action=create, item_id=<id>) plus `item` (action=update, id=<id>, \
assignee_agent=<recipient>) instead — lighter, no new item, no asset.\n\
Comment on lines +217 to +223

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Include the required item ID in the status-update guidance.

item(action=update) requires id, not only assignee_agent. Following either description literally leaves the update target missing and fails validation. Document id=<item_id> in both locations.

  • src/mcp_prompts.rs#L217-L223: use item(action=update, id=<id>, assignee_agent=<recipient>).
  • src/mcp_server.rs#L412-L413: include the same id requirement in the tool description.
📍 Affects 2 files
  • src/mcp_prompts.rs#L217-L223 (this comment)
  • src/mcp_server.rs#L412-L413
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/mcp_prompts.rs` around lines 217 - 223, Update the status-update guidance
so every item update includes the required target ID: in src/mcp_prompts.rs
lines 217-223, document item(action=update, id=<id>,
assignee_agent=<recipient>), and apply the same id requirement in the tool
description at src/mcp_server.rs lines 412-413.

- `inbox [me]` → call the `item` tool (action=list, state_group=\"backlog,unstarted,started\" \
by default to hide completed/cancelled items — omit state_group only if the command \
explicitly says `all`) — already scoped to this repo's linked project — and filter to \
Expand Down
2 changes: 1 addition & 1 deletion src/mcp_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ impl AgentflareMcp {
self.artifact_impl(req)
}
#[tool(
description = "Hand a work product to another agent: assigns/creates an item for the recipient (in the repo's linked project) and attaches the content to it as an asset. Re-attaching under the same item_id creates the next asset version, not a duplicate. Sender is this runtime's own identity."
description = "Hand a work product to another agent: assigns/creates an item for the recipient (in the repo's linked project) and attaches the content to it as an asset. Pass `item_id` to target an existing item instead of creating a new one — omitting it always mints a new item, so if the work already has a home item, pass its id. Re-attaching under the same item_id creates the next asset version, not a duplicate. For a plain-text status update with no versioned artifact to attach, prefer `comment` (action=create) + `item` (action=update, id=<id>, assignee_agent=...) instead of this tool — lighter, no new item, no asset. Sender is this runtime's own identity."
)]
fn handoff(&self, Parameters(req): Parameters<HandoffRequest>) -> Result<String, ErrorData> {
self.handoff_impl(req)
Expand Down
2 changes: 1 addition & 1 deletion src/mcp_server/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub(crate) struct HandoffRequest {
#[serde(default)]
pub(crate) r#type: Option<String>,
#[schemars(
description = "Existing item ID to assign and attach to, instead of creating a new item"
description = "Existing item ID to assign and attach to, instead of creating a new one. If the work already has a home item, always pass its id here — omitting it unconditionally creates a new item, even when one covering this work already exists."
)]
#[serde(default)]
pub(crate) item_id: Option<String>,
Expand Down
Loading