export_timeline
Export submission timeline data from a LimeSurvey survey with configurable date ranges and aggregation periods for analysis.
Instructions
Export timeline for a LimeSurvey survey.
Args:
sid: The survey ID.
period: The granularity level for aggregation submission counts ('day' or 'hour').
start_date: The start datetime (YYYY-MM-DDTHH:MM:SS) in any valid ISO 8601 format.
end_date: The end datetime (YYYY-MM-DDTHH:MM:SS) in any valid ISO 8601 format.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| period | Yes | ||
| start_datetime | Yes | ||
| end_datetime | No |
Implementation Reference
- main.py:352-366 (handler)The handler function for the 'export_timeline' MCP tool. Decorated with @mcp.tool(), which registers it with the FastMCP server. Parses input datetimes and delegates to the citric Client.export_timeline method.@mcp.tool() def export_timeline(sid: int, period: str, start_datetime: str, end_datetime: str = None) -> str: """Export timeline for a LimeSurvey survey. Args: sid: The survey ID. period: The granularity level for aggregation submission counts ('day' or 'hour'). start_date: The start datetime (YYYY-MM-DDTHH:MM:SS) in any valid ISO 8601 format. end_date: The end datetime (YYYY-MM-DDTHH:MM:SS) in any valid ISO 8601 format. """ with get_client() as client: start_dt = datetime.fromisoformat(start_datetime) end_dt = datetime.fromisoformat(end_datetime) if end_datetime else None return client.export_timeline(sid, period, start_dt, end_dt)