resource

Attribute Macro resource 

Source
#[resource]
Expand description

Marks a method as a resource handler

§Example

#[resource("config://settings/{section}")]
async fn get_config(&self, section: String) -> turbomcp::McpResult<String> {
    Ok(format!("Config for section: {}", section))
}