export_statistics
Export survey statistics from LimeSurvey in PDF, Excel, or HTML formats to analyze response data and generate reports.
Instructions
Export statistics for a LimeSurvey survey.
Args:
sid: The survey ID.
document_type: The document type (pdf, xls, html).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| document_type | No |
Implementation Reference
- main.py:340-350 (handler)The primary handler function for the 'export_statistics' MCP tool. It is decorated with @mcp.tool() which handles registration and schema inference from type hints and docstring. The function exports survey statistics using the LimeSurvey client.@mcp.tool() def export_statistics(sid: int, document_type: str = "pdf") -> str: """Export statistics for a LimeSurvey survey. Args: sid: The survey ID. document_type: The document type (pdf, xls, html). """ with get_client() as client: return client.export_statistics(sid, file_format=document_type)