distri_types/dynamic_tool.rs
1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4/// A dynamic tool factory definition. The `factory_type` determines
5/// how `config` is interpreted and what tool is created.
6#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
7pub struct DynamicToolFactory {
8 /// Name of the tool to create (e.g. "zippy_request")
9 pub name: String,
10 /// Factory type discriminator (e.g. "http")
11 #[serde(rename = "type")]
12 pub factory_type: String,
13 /// Factory-specific configuration (deserialized based on factory_type)
14 pub config: serde_json::Value,
15 /// Optional description override for the tool
16 #[serde(default, skip_serializing_if = "Option::is_none")]
17 pub description: Option<String>,
18}