1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! Automatic tool discovery and registration via inventory.
//!
//! This module provides infrastructure for automatically collecting all
//! `elicit_checked()` methods generated by `#[derive(Elicit)]` at runtime.
//!
//! # How It Works
//!
//! 1. Each `#[derive(Elicit)]` generates an `elicit_checked()` method
//! 2. The derive macro also submits a descriptor to the inventory
//! 3. At runtime, call `collect_all_elicit_tools()` to get all registered tools
//!
//! # Example
//!
//! ```ignore
//! use elicitation::{Elicit, collect_all_elicit_tools};
//!
//! #[derive(Elicit)]
//! struct Config { timeout: u32 }
//!
//! #[derive(Elicit)]
//! struct User { name: String }
//!
//! // Automatically collect all elicit tools
//! let tools = collect_all_elicit_tools();
//! println!("Found {} elicit tools", tools.len());
//! ```
/// Describes an elicit tool that can be registered with MCP.
///
/// Each type with `#[derive(Elicit)]` generates one of these descriptors
/// and submits it to the inventory at compile time.
collect!;
/// Collect all elicit tools registered via `#[derive(Elicit)]`.
///
/// Returns a vector of descriptors for all types that have derived `Elicit`
/// in the current binary. This enables automatic tool discovery without
/// manual registration.
///
/// # Example
///
/// ```ignore
/// use elicitation::collect_all_elicit_tools;
///
/// let tools = collect_all_elicit_tools();
/// for tool in tools {
/// println!("Found tool: {}", tool.qualified_name());
/// }
/// ```