windmill_api/models/
mcp_tool_value.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.592.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// McpToolValue : Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct McpToolValue {
17    #[serde(rename = "tool_type")]
18    pub tool_type: ToolType,
19    /// Path to the MCP resource/server configuration
20    #[serde(rename = "resource_path")]
21    pub resource_path: String,
22    /// Whitelist of specific tools to include from this MCP server
23    #[serde(rename = "include_tools", skip_serializing_if = "Option::is_none")]
24    pub include_tools: Option<Vec<String>>,
25    /// Blacklist of tools to exclude from this MCP server
26    #[serde(rename = "exclude_tools", skip_serializing_if = "Option::is_none")]
27    pub exclude_tools: Option<Vec<String>>,
28}
29
30impl McpToolValue {
31    /// Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers
32    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/// 
42#[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