Skip to main content
Glama
sheacoding

MCP Reminder

by sheacoding

list_todos

Retrieve and filter todo items by status to track pending, completed, or all tasks within the MCP Reminder system.

Instructions

列出待办事项

Args: status: 筛选状态,可选值: "pending"(未完成)、"completed"(已完成)、"all"(全部),默认"pending"

Returns: 待办事项列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNopending

Implementation Reference

  • The `list_todos` function, registered as an MCP tool, retrieves and filters tasks based on their status ("pending", "completed", or "all") and returns them as a structured list.
    def list_todos(status: str = "pending") -> dict:
        """
        列出待办事项
    
        Args:
            status: 筛选状态,可选值: "pending"(未完成)、"completed"(已完成)、"all"(全部),默认"pending"
    
        Returns:
            待办事项列表
        """
        todos = storage.load_todos()
    
        # 筛选
        if status == "pending":
            todos = [t for t in todos if t.status == "pending"]
        elif status == "completed":
            todos = [t for t in todos if t.status == "completed"]
        # status == "all" 则不筛选
    
        logger.info(f"列出待办事项,状态: {status}, 数量: {len(todos)}")
    
        todos_data = [
            {
                "id": todo.id,
                "title": todo.title,
                "description": todo.description,
                "remind_time": todo.remind_time,
                "status": todo.status,
                "created_at": todo.created_at
            }
            for todo in todos
        ]
    
        return {
            "success": True,
            "count": len(todos),
            "todos": todos_data,
            "status_filter": status
        }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sheacoding/mcp-reminder'

If you have feedback or need assistance with the MCP directory API, please join our Discord server