Skip to main content
Glama

Toggl MCP Server

by ikido
models.py1.96 kB
"""Pydantic models for Toggl MCP Server.""" from pydantic import BaseModel from typing import Optional, List class User(BaseModel): """Toggl workspace user.""" id: str email: str name: str class TimeEntry(BaseModel): """Toggl time entry.""" id: int workspace_id: int user_id: int user_email: str project_name: Optional[str] = None description: str start: str stop: str duration: int # in seconds class ParsedEntry(BaseModel): """Parsed time entry with extracted metadata.""" description_clean: str entity_id: Optional[str] = None entity_database: Optional[str] = None entity_type: Optional[str] = None project: Optional[str] = None is_matched: bool class MatchedEntity(BaseModel): """Aggregated matched entity.""" entity_database: str entity_type: str entity_id: str description: str duration_hours: float class UnmatchedActivity(BaseModel): """Aggregated unmatched activity.""" description: str duration_hours: float class UserStatistics(BaseModel): """Statistics for a single user.""" total_duration_hours: float matched_duration_hours: float unmatched_duration_hours: float class UserAggregation(BaseModel): """Aggregated data for a single user.""" user_email: str matched_entities: List[MatchedEntity] unmatched_activities: List[UnmatchedActivity] statistics: UserStatistics class OverallStatistics(BaseModel): """Overall statistics across all users.""" total_users: int total_duration_hours: float total_matched_duration_hours: float total_unmatched_duration_hours: float class AggregatedData(BaseModel): """Aggregated time tracking data response.""" users: dict # key: email, value: UserAggregation statistics: OverallStatistics class ErrorResponse(BaseModel): """Error response structure.""" code: str message: str

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/ikido/toggl-mcp-custom'

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