1use rmcp::model::{ElicitationAction, PromptArgument, PromptMessage, ResourceContents};
4use serde::{Deserialize, Serialize};
5use serde_json::{Map, Value};
6
7#[derive(Debug, Clone)]
9pub struct McpToolInfo {
10 pub name: String,
11 pub description: String,
12 pub provider: String,
13 pub input_schema: Value,
14 pub output_schema: Option<Value>,
19}
20
21#[derive(Debug, Clone)]
23pub struct McpResourceInfo {
24 pub(crate) provider: String,
25 pub(crate) uri: String,
26 pub(crate) name: String,
27 pub(crate) description: Option<String>,
28 pub(crate) mime_type: Option<String>,
29 pub(crate) size: Option<i64>,
30}
31
32#[derive(Debug, Clone)]
34pub struct McpResourceData {
35 pub(crate) provider: String,
36 pub(crate) uri: String,
37 pub(crate) contents: Vec<ResourceContents>,
38 pub(crate) meta: Map<String, Value>,
39}
40
41#[derive(Debug, Clone)]
43pub struct McpPromptInfo {
44 pub(crate) provider: String,
45 pub(crate) name: String,
46 pub(crate) description: Option<String>,
47 pub(crate) arguments: Vec<PromptArgument>,
48}
49
50#[derive(Debug, Clone)]
52pub struct McpPromptDetail {
53 pub(crate) provider: String,
54 pub(crate) name: String,
55 pub(crate) description: Option<String>,
56 pub(crate) messages: Vec<PromptMessage>,
57 pub(crate) meta: Map<String, Value>,
58}
59
60#[derive(Debug, Clone)]
62pub struct McpClientStatus {
63 pub enabled: bool,
64 pub provider_count: usize,
65 pub active_connections: usize,
66 pub configured_providers: Vec<String>,
67}
68
69#[derive(Debug, Clone)]
71pub struct McpElicitationRequest {
72 pub message: String,
73 pub requested_schema: Value,
74 pub(crate) meta: Option<Value>,
75}
76
77#[derive(Debug, Clone)]
79pub struct McpElicitationResponse {
80 pub action: ElicitationAction,
81 pub content: Option<Value>,
82 pub meta: Option<Value>,
83}
84
85pub const OPENAI_FILE_PARAMS_META_KEY: &str = "_meta";
89pub const OPENAI_FILE_PARAMS_VALUE: &str = "openai/fileParams";
90
91#[derive(Debug, Clone, Serialize, Deserialize)]
97pub struct ProvidedFilePayload {
98 #[serde(rename = "fileId")]
100 file_id: String,
101 #[serde(rename = "fileName")]
103 file_name: String,
104 #[serde(rename = "mimeType")]
106 mime_type: String,
107 #[serde(rename = "fileSize")]
109 file_size: i64,
110}
111
112#[derive(Debug, Clone)]
114pub struct FileUploadResult {
115 file_id: String,
117 payload: ProvidedFilePayload,
119}
120
121#[derive(Debug, Clone, Serialize, Deserialize)]
128pub struct FileParamSchemaEntry {
129 property_name: String,
131 description: String,
133 required: bool,
135}