foundry-mcp 0.7.1

A comprehensive CLI tool and MCP server for deterministic project management and AI coding assistant integration
Documentation
//! # MCP Tool Definitions
//!
//! This module defines all MCP tools that map directly to CLI commands.
//! Each tool provides identical functionality to its corresponding CLI command
//! with the same parameter validation and JSON response format.
//!
//! All tool definitions are now auto-generated using the #[derive(McpTool)] macro
//! or manual trait implementations for special cases (unit structs).

use rust_mcp_sdk::schema::Tool as McpTool;

// Import the CLI args that have McpTool implementations
use crate::cli::args::{
    AnalyzeProjectArgs, CreateProjectArgs, CreateSpecArgs, DeleteSpecArgs, GetFoundryHelpArgs,
    ListProjectsArgs, ListSpecsArgs, LoadProjectArgs, LoadSpecArgs, UpdateSpecArgs,
    ValidateContentArgs,
};
use crate::mcp::traits::McpToolDefinition;

/// Tool definitions for all 10 foundry commands
pub struct FoundryTools;

impl FoundryTools {
    /// Get all available tools
    pub fn all_tools() -> Vec<McpTool> {
        vec![
            CreateProjectArgs::tool_definition(),   // Generated by macro
            AnalyzeProjectArgs::tool_definition(),  // Generated by macro
            LoadProjectArgs::tool_definition(),     // Generated by macro
            CreateSpecArgs::tool_definition(),      // Generated by macro
            LoadSpecArgs::tool_definition(),        // Generated by macro
            UpdateSpecArgs::tool_definition(),      // Generated by macro
            DeleteSpecArgs::tool_definition(),      // Generated by macro
            ListProjectsArgs::tool_definition(),    // Manual impl for unit struct
            ListSpecsArgs::tool_definition(),       // Generated by macro
            ValidateContentArgs::tool_definition(), // Generated by macro
            GetFoundryHelpArgs::tool_definition(),  // Generated by macro
        ]
    }

    // All tool definitions are now auto-generated by McpTool macro or trait implementations
}