refactor: drop Manage prefix from consolidated smart MCP tools

This commit is contained in:
Riz Ashraf committed 2026-10-05 11:11:41 +01:00
1 parent e45db33297
commit 961abb01e7
8 files changed
+914 -100

No files matched your search

+303 -2
View File
@@ -140,9 +140,9 @@ pub enum StickyNoteAction {
Clear,
}
/// Manage ephemeral sticky notes with TTL (add, read, delete, clear).
/// Ephemeral sticky notes with TTL (add, read, delete, clear).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct ManageStickyNotesTool {
pub struct StickyNotesTool {
/// Action to perform: 'add', 'read', 'delete', or 'clear'.
pub action: StickyNoteAction,
/// Content of the sticky note (required for 'add').
@@ -1083,3 +1083,304 @@ pub struct SearchSnippetsHybridTool {
pub limit: Option<usize>,
}
// Consolidated Smart Management Tools
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum HandoffMemoAction {
Leave,
Read,
Clear,
}
/// Manage handoff memos across sessions (leave, read, clear).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct HandoffMemosTool {
/// Action to perform: 'leave', 'read', or 'clear'.
pub action: HandoffMemoAction,
/// Content of the handoff memo (required for 'leave').
pub content: Option<String>,
/// Optional namespace filter or assignment.
pub namespace: Option<String>,
/// Array of memo IDs to clear (required for 'clear').
pub ids: Option<Vec<String>>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum TaskAction {
Add,
Update,
Delete,
List,
SetCriteria,
Verify,
}
/// Consolidated task management (add, update, delete, list, set_criteria, verify).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct TasksTool {
/// Action to perform: 'add', 'update', 'delete', 'list', 'set_criteria', or 'verify'.
pub action: TaskAction,
/// Task ID (required for 'update', 'delete', 'set_criteria', 'verify').
pub id: Option<String>,
/// Task title (required for 'add').
pub title: Option<String>,
/// Task description (required for 'add').
pub description: Option<String>,
/// New status: 'pending', 'completed', or 'cancelled' (for 'update').
pub status: Option<String>,
/// Parent task ID (optional for 'add').
pub parent_id: Option<String>,
/// List of dependency task IDs (optional for 'add').
pub dependencies: Option<Vec<String>>,
/// Git branch filter or assignment.
pub git_branch: Option<String>,
/// Acceptance criteria (required for 'set_criteria').
pub criteria: Option<Vec<String>>,
/// Summary level: 'compact', 'detailed', or 'full' (for 'list').
pub summary_level: Option<String>,
/// Maximum tokens budget cap (for 'list').
pub max_tokens: Option<usize>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum MilestoneAction {
Add,
Update,
List,
}
/// Consolidated milestone management (add, update, list).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct MilestonesTool {
/// Action to perform: 'add', 'update', or 'list'.
pub action: MilestoneAction,
/// Milestone ID (required for 'update').
pub id: Option<String>,
/// Milestone title (required for 'add').
pub title: Option<String>,
/// New status (for 'update').
pub status: Option<String>,
/// Optional namespace filter or assignment.
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PinnedFileAction {
Pin,
Unpin,
List,
}
/// Consolidated pinned files focus management (pin, unpin, list).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct PinnedFilesTool {
/// Action to perform: 'pin', 'unpin', or 'list'.
pub action: PinnedFileAction,
/// Absolute or workspace relative file path (required for 'pin' and 'unpin').
pub path: Option<String>,
/// Optional namespace.
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum ContextWorkspaceAction {
Save,
Load,
List,
Delete,
Diff,
}
/// Consolidated context workspace state management (save, load, list, delete, diff).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct ContextWorkspacesTool {
/// Action to perform: 'save', 'load', 'list', 'delete', or 'diff'.
pub action: ContextWorkspaceAction,
/// Workspace name.
pub name: Option<String>,
/// Second workspace name (for 'diff').
pub other_name: Option<String>,
/// Pinned file paths (for 'save').
pub pinned_files: Option<Vec<String>>,
/// Active task IDs (for 'save').
pub active_task_ids: Option<Vec<String>>,
/// Optional namespace.
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PrChecklistAction {
Add,
Get,
Clear,
}
/// Consolidated PR checklist management (add, get, clear).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct PrChecklistTool {
/// Action to perform: 'add', 'get', or 'clear'.
pub action: PrChecklistAction,
/// Checklist item description (required for 'add').
pub description: Option<String>,
/// Optional namespace.
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum SnippetAction {
Store,
Search,
Delete,
Tag,
}
/// Consolidated reusable code snippets management (store, search, delete, tag).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct SnippetsTool {
/// Action to perform: 'store', 'search', 'delete', or 'tag'.
pub action: SnippetAction,
/// Snippet ID (required for 'delete', 'tag').
pub id: Option<String>,
/// Search query or snippet name.
pub query: Option<String>,
/// Snippet language (for 'store').
pub language: Option<String>,
/// Code content (for 'store').
pub code: Option<String>,
/// Snippet description (for 'store').
pub description: Option<String>,
/// Classification tags (for 'store', 'search', 'tag').
pub tags: Option<Vec<String>>,
/// Enable hybrid lexical + semantic vector ranking (for 'search').
pub hybrid: Option<bool>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum DecisionAction {
Log,
Query,
Delete,
}
/// Consolidated Architectural Decision Records (ADRs) management (log, query, delete).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct DecisionsTool {
/// Action to perform: 'log', 'query', or 'delete'.
pub action: DecisionAction,
/// ADR ID (required for 'delete').
pub id: Option<String>,
/// ADR title (required for 'log').
pub title: Option<String>,
/// ADR status (required for 'log').
pub status: Option<String>,
/// Context & problem statement (required for 'log').
pub context: Option<String>,
/// Decision made (required for 'log').
pub decision: Option<String>,
/// Consequences & tradeoffs (required for 'log').
pub consequences: Option<String>,
/// Search query string (for 'query').
pub query: Option<String>,
/// Optional namespace.
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum TechDebtAction {
Log,
Resolve,
List,
}
/// Consolidated technical debt management (log, resolve, list).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct TechDebtTool {
/// Action to perform: 'log', 'resolve', or 'list'.
pub action: TechDebtAction,
/// Tech debt ID (required for 'resolve').
pub id: Option<String>,
/// Tech debt description (required for 'log').
pub description: Option<String>,
/// Ideal solution (required for 'log').
pub ideal_solution: Option<String>,
/// Include resolved tech debt items (for 'list').
pub include_resolved: Option<bool>,
/// Associated git commit hash.
pub git_commit: Option<String>,
/// Associated git branch.
pub git_branch: Option<String>,
/// Symbol references associated with the tech debt.
pub symbol_references: Option<Vec<String>>,
/// Line range associated with the tech debt.
pub line_range: Option<String>,
/// Optional namespace.
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum EnvAction {
UpdateFingerprint,
ReadFingerprint,
LogRequirement,
Register,
GetDetails,
}
/// Consolidated environment & infrastructure management (update_fingerprint, read_fingerprint, log_requirement, register, get_details).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct EnvironmentTool {
/// Action to perform.
pub action: EnvAction,
/// Map of tool names to versions (for 'update_fingerprint').
pub tool_versions: Option<std::collections::HashMap<String, String>>,
/// Env variable key (for 'log_requirement').
pub key: Option<String>,
/// Description (for 'log_requirement', 'register').
pub description: Option<String>,
/// Secret flag (for 'log_requirement').
pub is_secret: Option<bool>,
/// Environment name (for 'register').
pub name: Option<String>,
/// Environment URL (for 'register').
pub url: Option<String>,
/// VPN required flag (for 'register').
pub requires_vpn: Option<bool>,
/// Optional namespace.
pub namespace: Option<String>,
}
#[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum ClipboardAction {
Read,
Write,
ToggleWatch,
}
/// Consolidated OS clipboard management (read, write, toggle_watch).
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
pub struct ClipboardTool {
/// Action to perform: 'read', 'write', or 'toggle_watch'.
pub action: ClipboardAction,
/// Plain text content (for 'write').
pub text: Option<String>,
/// HTML content (for 'write').
pub html: Option<String>,
/// File paths for Windows File Drop (for 'write').
pub files: Option<Vec<String>>,
/// Image path (for 'write').
pub image_path: Option<String>,
/// Enable watch mode flag (for 'toggle_watch').
pub enabled: Option<bool>,
}