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