// MCP Tool definitions
export const TOOLS = [
{
name: "memory_create",
description: "Create a new memory in the database",
inputSchema: {
type: "object",
properties: {
type: {
type: "string",
description: "The type of memory (e.g., 'conversation', 'fact', 'preference')"
},
content: {
type: "object",
description: "The content of the memory"
},
source: {
type: "string",
description: "The source of the memory (e.g., 'user_message', 'system_inference')"
},
tags: {
type: "array",
items: {
type: "string"
},
description: "Tags associated with the memory"
},
confidence: {
type: "number",
description: "Confidence score of the memory (0.0 to 1.0)"
}
},
required: ["type", "content", "source", "confidence"]
}
},
{
name: "memory_search",
description: "Search memories by semantic similarity",
inputSchema: {
type: "object",
properties: {
query: {
type: "string",
description: "The search query"
},
type: {
type: "string",
description: "Filter by memory type"
},
tags: {
type: "array",
items: {
type: "string"
},
description: "Filter by tags"
},
limit: {
type: "number",
description: "Maximum number of results to return"
}
},
required: ["query"]
}
},
{
name: "memory_list",
description: "List memories with pagination and filters",
inputSchema: {
type: "object",
properties: {
type: {
type: "string",
description: "Filter by memory type"
},
tags: {
type: "array",
items: {
type: "string"
},
description: "Filter by tags"
},
limit: {
type: "number",
description: "Maximum number of results to return"
}
}
}
},
{
name: "memory_update",
description: "Update an existing memory",
inputSchema: {
type: "object",
properties: {
id: {
type: "string",
description: "The ID of the memory to update"
},
content: {
type: "object",
description: "The new content of the memory"
},
tags: {
type: "array",
items: { type: "string" },
description: "The new tags"
},
confidence: {
type: "number",
description: "The new confidence score"
},
type: {
type: "string",
description: "The new type"
},
source: {
type: "string",
description: "The new source"
}
},
required: ["id"]
}
},
{
name: "memory_delete",
description: "Delete a memory by ID",
inputSchema: {
type: "object",
properties: {
id: {
type: "string",
description: "The ID of the memory to delete"
}
},
required: ["id"]
}
},
{
name: "graph_create_entities",
description: "Create multiple new entities in the knowledge graph",
inputSchema: {
type: "object",
properties: {
entities: {
type: "array",
items: {
type: "object",
properties: {
name: { type: "string", description: "The name of the entity" },
entityType: { type: "string", description: "The type of the entity" },
observations: {
type: "array",
items: { type: "string" },
description: "Observations about the entity"
}
},
required: ["name", "entityType"]
}
}
},
required: ["entities"]
}
},
{
name: "graph_create_relations",
description: "Create multiple new relations between entities in the knowledge graph",
inputSchema: {
type: "object",
properties: {
relations: {
type: "array",
items: {
type: "object",
properties: {
from: { type: "string", description: "Source entity name" },
to: { type: "string", description: "Target entity name" },
relationType: { type: "string", description: "Type of relation (in active voice)" }
},
required: ["from", "to", "relationType"]
}
}
},
required: ["relations"]
}
},
{
name: "graph_add_observations",
description: "Add new observations to existing entities",
inputSchema: {
type: "object",
properties: {
observations: {
type: "array",
items: {
type: "object",
properties: {
entityName: { type: "string", description: "Name of the entity" },
contents: {
type: "array",
items: { type: "string" },
description: "Observations to add"
}
},
required: ["entityName", "contents"]
}
}
},
required: ["observations"]
}
},
{
name: "graph_delete_entities",
description: "Delete multiple entities and their associated relations",
inputSchema: {
type: "object",
properties: {
entityNames: {
type: "array",
items: { type: "string" },
description: "Names of entities to delete"
}
},
required: ["entityNames"]
}
},
{
name: "graph_delete_observations",
description: "Delete specific observations from entities",
inputSchema: {
type: "object",
properties: {
deletions: {
type: "array",
items: {
type: "object",
properties: {
entityName: { type: "string", description: "Name of the entity" },
observations: {
type: "array",
items: { type: "string" },
description: "Observations to delete"
}
},
required: ["entityName", "observations"]
}
}
},
required: ["deletions"]
}
},
{
name: "graph_delete_relations",
description: "Delete multiple relations from the knowledge graph",
inputSchema: {
type: "object",
properties: {
relations: {
type: "array",
items: {
type: "object",
properties: {
from: { type: "string", description: "Source entity name" },
to: { type: "string", description: "Target entity name" },
relationType: { type: "string", description: "Type of relation" }
},
required: ["from", "to", "relationType"]
}
}
},
required: ["relations"]
}
},
{
name: "graph_read",
description: "Read the entire knowledge graph",
inputSchema: {
type: "object",
properties: {}
}
},
{
name: "graph_search_nodes",
description: "Search for nodes in the knowledge graph (supports both keyword and semantic search)",
inputSchema: {
type: "object",
properties: {
query: {
type: "string",
description: "Search query"
},
semantic: {
type: "boolean",
description: "Use semantic search (default: false)"
},
limit: {
type: "number",
description: "Maximum results (default: 10)"
}
},
required: ["query"]
}
},
{
name: "graph_open_nodes",
description: "Open specific nodes by their names",
inputSchema: {
type: "object",
properties: {
names: {
type: "array",
items: { type: "string" },
description: "Entity names to retrieve"
}
},
required: ["names"]
}
}
];