//! Argument structs for the MCP tools: `serde::Deserialize` + //! `schemars::JsonSchema` derives whose field doc-comments become the //! parameter descriptions claude sees in each tool's input schema. use rmcp::schemars; /// MCP tool args for `mark_todos_done`. #[derive(Debug, serde::Deserialize, schemars::JsonSchema)] pub struct MarkTodosDoneArgs { /// Todo ids to clear (from `get_loose_ends`'s `todo #N` lines). Only /// these ids are acked — not a range. Unknown/already-acked ids are /// silently skipped. pub ids: Vec, } /// MCP tool args for `remind`. Exactly one of `delay_seconds` or /// `at_unix_timestamp` must be set; both / neither is a tool-side error. /// Hides the tagged `ReminderTiming` enum behind a flatter schema so the /// model picks one field instead of building `{"timing_type": "in_seconds", /// "seconds": 60}` shaped objects. #[derive(Debug, serde::Deserialize, schemars::JsonSchema)] pub struct RemindArgs { /// Body that lands in your inbox when the reminder fires (sender /// will appear as `reminder`). Soft cap at 4 KiB inline — anything /// larger gets auto-persisted to a file under /// `/agents//state/reminders/auto-.md` and the inbox /// message becomes a short pointer. Pass `file_path` if you want /// to control the destination yourself. pub message: String, /// Fire `delay_seconds` from now (relative). Set this OR /// `at_unix_timestamp`, not both. #[serde(default)] pub delay_seconds: Option, /// Fire at this absolute unix timestamp (seconds since epoch). Set /// this OR `delay_seconds`, not both. #[serde(default)] pub at_unix_timestamp: Option, /// Optional path to a file the scheduler should reference instead of /// inlining a long `message`. Use this for large payloads (research /// notes, file lists, intermediate state). Path must be reachable from /// the agent's container — typically under `/agents//state/`. #[serde(default)] pub file_path: Option, } /// MCP tool args for `compact`. #[derive(Debug, serde::Deserialize, schemars::JsonSchema)] pub struct CompactArgs { /// Optional wake-up prompt. When set and the compact actually runs /// (gated on context usage — see the tool description), the harness /// drives one synthetic follow-up turn with this string as its body /// as soon as compaction finishes, so you don't have to wait for the /// next external event to continue. Omit for a fire-and-forget compact /// with no follow-up. #[serde(default)] pub wake_prompt: Option, } // ----------------------------------------------------------------------------- // Privileged tool arg types (lifecycle) // ----------------------------------------------------------------------------- #[derive(Debug, serde::Deserialize, schemars::JsonSchema)] pub struct SetStatusArgs { /// Status text to display on the dashboard card. Pass an empty string to clear. pub text: String, } #[derive(Debug, serde::Deserialize, schemars::JsonSchema)] pub struct GetAgentMetaArgs { /// Logical name of the agent to query (e.g. `"iris"`, `"bob"`). /// Omit to query your own identity + status — replaces the /// previous `whoami` self-introspection tool. #[serde(default)] pub name: Option, } #[derive(Debug, serde::Deserialize, schemars::JsonSchema)] pub struct CancelLooseEndArgs { /// Which kind of thread to cancel — `"reminder"` for a scheduled /// `remind` that hasn't fired yet, or `"todo"` for a loose-ends-v2 todo /// (bash/matrix/forge). Use the `kind` field straight off the /// `get_loose_ends` row. pub kind: String, /// Row id from the matching `get_loose_ends` entry. pub id: i64, }