use crate::api::ApiParam;

/// Static metadata for an MCP tool exposed by ontoref-daemon.
///
/// Registered at link time via `inventory::submit!` — generated by
/// `#[onto_mcp_tool(...)]` proc-macro attribute on each tool struct.
/// Collected via `inventory::iter::<McpToolEntry>()` (ADR-015).
///
/// `params` reuses [`ApiParam`] — both API routes and MCP tools are protocol
/// surfaces and share the same `name:type:constraint:description` shape.
#[derive(serde::Serialize, Clone)]
pub struct McpToolEntry {
    pub name: &'static str,
    pub description: &'static str,
    /// Semantic grouping (e.g. "discovery", "ontology", "knowledge",
    /// "validation", "config"). Used by future tiering work; safe to leave
    /// empty.
    pub category: &'static str,
    pub params: &'static [ApiParam],
    /// Source file path captured via `file!()` at the macro call site.
    pub source_file: &'static str,
}

inventory::collect!(McpToolEntry);
