harn_vm/mcp_server/
defs.rs1use crate::value::VmClosure;
2
3pub struct McpToolDef {
5 pub name: String,
6 pub title: Option<String>,
7 pub description: String,
8 pub input_schema: serde_json::Value,
9 pub output_schema: Option<serde_json::Value>,
10 pub annotations: Option<serde_json::Value>,
11 pub handler: VmClosure,
12}
13
14pub struct McpResourceDef {
16 pub uri: String,
17 pub name: String,
18 pub title: Option<String>,
19 pub description: Option<String>,
20 pub mime_type: Option<String>,
21 pub text: String,
22}
23
24pub struct McpResourceTemplateDef {
26 pub uri_template: String,
27 pub name: String,
28 pub title: Option<String>,
29 pub description: Option<String>,
30 pub mime_type: Option<String>,
31 pub handler: VmClosure,
32}
33
34pub struct McpPromptArgDef {
36 pub name: String,
37 pub description: Option<String>,
38 pub required: bool,
39}
40
41pub struct McpPromptDef {
43 pub name: String,
44 pub title: Option<String>,
45 pub description: Option<String>,
46 pub arguments: Option<Vec<McpPromptArgDef>>,
47 pub handler: VmClosure,
48}