Skip to main content

mcp_memory/
types.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
4pub struct Entity {
5    pub name: String,
6    #[serde(rename = "entityType")]
7    pub entity_type: String,
8    pub observations: Vec<String>,
9}
10
11#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
12pub struct Relation {
13    pub from: String,
14    pub to: String,
15    #[serde(rename = "relationType")]
16    pub relation_type: String,
17}
18
19#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
20pub struct KnowledgeGraphOut {
21    pub entities: Vec<Entity>,
22    pub relations: Vec<Relation>,
23}
24
25