from mcp.types import Tool


MEMORY_BUILDER_TOOLS = [
    Tool(
        name="add_memory",
        description="Add memory (messages, JSON, text) to Graphiti knowledge graph",
        inputSchema={
        "type": "object",
        "properties": {
            "name": {
                "type": "string",
                "description": "Name/title of the memory episode"
            },
            "content": {
                "type": "string",
                "description": "The actual content to store (messages, JSON, text)"
            },
            "source_description": {
                "type": "string",
                "description": "Short description of the content source (e.g., 'User assistant conversation about a specific topic', 'API response')"
            },
            "content_type": {
                "type": "string",
                "enum": ["messages", "json", "text"],
                "default": "messages",
                "description": "Type of content being stored"
            },
            "reference_time": {
                "type": "string",
                "description": "ISO timestamp (optional, defaults to current time)"
            },
            "group_id": {
                "type": "string",
                "default": "",
                "description": "Group/partition identifier for organizing memories"
            },
            "session_id": {
                "type": "string",
                "description": "Session identifier for tracking related memories"
            },
            "update_communities": {
                "type": "boolean",
                "default": False,
                "description": "Whether to update communities with new information"
            },

            "metadata": {
                "type": "object",
                "description": "Additional metadata to attach to all entities"
            },
            "previous_episode_uuids": {
                "type": "array",
                "items": {"type": "string"},
                "description": "List of previous episode UUIDs for context"
            }
        },
        "required": ["name", "content", "source_description", "content_type"]
    }
    )
]