windmill_api/models/
mcp_tool_value.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct McpToolValue {
17 #[serde(rename = "tool_type")]
18 pub tool_type: ToolType,
19 #[serde(rename = "resource_path")]
21 pub resource_path: String,
22 #[serde(rename = "include_tools", skip_serializing_if = "Option::is_none")]
24 pub include_tools: Option<Vec<String>>,
25 #[serde(rename = "exclude_tools", skip_serializing_if = "Option::is_none")]
27 pub exclude_tools: Option<Vec<String>>,
28}
29
30impl McpToolValue {
31 pub fn new(tool_type: ToolType, resource_path: String) -> McpToolValue {
33 McpToolValue {
34 tool_type,
35 resource_path,
36 include_tools: None,
37 exclude_tools: None,
38 }
39 }
40}
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum ToolType {
44 #[serde(rename = "mcp")]
45 Mcp,
46}
47
48impl Default for ToolType {
49 fn default() -> ToolType {
50 Self::Mcp
51 }
52}
53