memory_create_todo
Create and manage TODO tasks with priority, status, and category tracking for organized task management within the Memora memory system.
Instructions
Create a new TODO/task memory.
Args: content: Description of the task status: Task status - "open" (default) or "closed" closed_reason: If closed, the reason - "complete" or "not_planned" priority: Task priority - "high", "medium" (default), "low" category: Task category (e.g., "cloud-backend", "graph-visualization", "docs")
Returns: Created TODO memory with auto-assigned tag "memora/todos"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| status | No | open | |
| closed_reason | No | ||
| priority | No | medium | |
| category | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- memora/server.py:595-652 (handler)Implementation of the MCP tool 'memory_create_todo', which validates input fields (status, closed_reason, priority), builds the metadata, and saves the task with the tag 'memora/todos'.
async def memory_create_todo( content: str, status: str = "open", closed_reason: Optional[str] = None, priority: str = "medium", category: Optional[str] = None, ) -> Dict[str, Any]: """Create a new TODO/task memory. Args: content: Description of the task status: Task status - "open" (default) or "closed" closed_reason: If closed, the reason - "complete" or "not_planned" priority: Task priority - "high", "medium" (default), "low" category: Task category (e.g., "cloud-backend", "graph-visualization", "docs") Returns: Created TODO memory with auto-assigned tag "memora/todos" """ # Validate status valid_statuses = {"open", "closed"} if status not in valid_statuses: return {"error": "invalid_status", "message": f"Status must be one of: {', '.join(valid_statuses)}"} # Validate closed_reason if status is closed if status == "closed": valid_reasons = {"complete", "not_planned"} if not closed_reason: return {"error": "missing_closed_reason", "message": "closed_reason required when status is 'closed'"} if closed_reason not in valid_reasons: return {"error": "invalid_closed_reason", "message": f"closed_reason must be one of: {', '.join(valid_reasons)}"} # Validate priority valid_priorities = {"high", "medium", "low"} if priority not in valid_priorities: return {"error": "invalid_priority", "message": f"Priority must be one of: {', '.join(valid_priorities)}"} # Build metadata metadata: Dict[str, Any] = { "type": "todo", "status": status, "priority": priority, } if closed_reason: metadata["closed_reason"] = closed_reason if category: metadata["category"] = category # Create with auto-tag tags = ["memora/todos"] try: record = _create_memory(content.strip(), metadata, tags) except ValueError as exc: return {"error": "invalid_input", "message": str(exc)} _schedule_cloud_graph_sync() return {"memory": record}