mcp_tools

Attribute Macro mcp_tools 

Source
#[mcp_tools]
Expand description

Derives MCP tool implementations for all methods in an impl block.

This is a convenience macro that applies #[mcp_tool] to all public methods in an impl block.

§Usage

use pulseengine_mcp_macros::mcp_tools;

#[mcp_tools]
impl MyServer {
    /// This becomes an MCP tool
    async fn tool_one(&self, param: String) -> String {
        param.to_uppercase()
    }

    /// This also becomes an MCP tool
    fn tool_two(&self, x: i32, y: i32) -> i32 {
        x + y
    }

    // Private methods are ignored
    fn helper_method(&self) -> bool {
        true
    }
}