pub struct ToolMetadata {
pub name: &'static str,
pub category: &'static Category,
pub description: &'static str,
pub args_schema: fn() -> Value,
pub output_schema: fn() -> Value,
pub prompt_arguments: fn() -> Vec<PromptArgument>,
pub generate_prompts: fn(&Value) -> Vec<PromptMessage>,
}Expand description
Tool metadata for automatic discovery.
Every tool in kodegen-mcp-schema registers exactly one ToolMetadata via the #tool_metadata proc macro. This enables automatic discovery in kodegen.
Fields§
§name: &'static str§category: &'static Category§description: &'static str§args_schema: fn() -> Value§output_schema: fn() -> Value§prompt_arguments: fn() -> Vec<PromptArgument>§generate_prompts: fn(&Value) -> Vec<PromptMessage>Generate prompt messages from JSON arguments. Takes PromptArgs as JSON Value, deserializes internally, calls generate_prompts.
Trait Implementations§
impl Collect for ToolMetadata
Auto Trait Implementations§
impl Freeze for ToolMetadata
impl RefUnwindSafe for ToolMetadata
impl Send for ToolMetadata
impl Sync for ToolMetadata
impl Unpin for ToolMetadata
impl UnwindSafe for ToolMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more