Skip to main content
Glama

check_time_reminders

Check for due or upcoming reminders within a specified time window to help users stay on track with scheduled tasks and deadlines.

Instructions

Check for due or upcoming time reminders

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
upcomingMinutesNoCheck for reminders due within this many minutes (default: 60)

Implementation Reference

  • The main handler function for the 'check_time_reminders' tool. It queries the database for due reminders within the specified minutes and returns them as Reminder objects.
    def check_time_reminders(self, upcoming_minutes: int = 60) -> List[Reminder]: """Check for due or upcoming time reminders""" reminders_data = self.db.get_reminders(upcoming_minutes) return [Reminder(**reminder) for reminder in reminders_data]
  • The tool registration block including the input schema definition for 'check_time_reminders'.
    Tool( name=TimeTools.CHECK_TIME_REMINDERS.value, description="Check for due or upcoming time reminders", inputSchema={ "type": "object", "properties": { "upcomingMinutes": { "type": "integer", "description": "Check for reminders due within this many minutes (default: 60)", }, }, }, ), ]
  • Dispatch/registration case in the tool execution handler that invokes the check_time_reminders method.
    case TimeTools.CHECK_TIME_REMINDERS.value: upcoming_minutes = arguments.get("upcomingMinutes", 60) result = time_server.check_time_reminders(upcoming_minutes)
  • Database helper method that implements the core logic for filtering pending reminders due within the upcoming minutes threshold.
    def get_reminders(self, upcoming_minutes: int = 60) -> List[Dict[str, Any]]: """Get reminders due within the specified minutes""" now = datetime.now(ZoneInfo('UTC')) cutoff_time = now + timedelta(minutes=upcoming_minutes) due_reminders = [] for reminder in self.reminders: if reminder['status'] == 'pending': reminder_time = datetime.fromisoformat(reminder['reminderTime'].replace('Z', '+00:00')) # Fix: Ensure timezone-aware comparison (handles both naive and aware datetimes) if reminder_time.tzinfo is None: reminder_time = reminder_time.replace(tzinfo=ZoneInfo('UTC')) if reminder_time <= cutoff_time: due_reminders.append(reminder) return due_reminders
  • Pydantic model defining the structure of a Reminder, used as the output type for check_time_reminders.
    class Reminder(BaseModel): reminderId: str reminderTime: str message: str relatedTaskId: Optional[str] = None status: str # "pending", "completed" createdTime: str

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/n0zer0d4y/chronos-protocol'

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