export_statistics
Export survey statistics in PDF, XLS, or HTML formats from LimeSurvey using the survey ID for streamlined data analysis and reporting.
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 |
|---|---|---|---|
| document_type | No | ||
| sid | Yes |
Implementation Reference
- main.py:340-350 (handler)The handler function for the 'export_statistics' tool. It is decorated with @mcp.tool(), which registers it in the FastMCP server. The function calls the underlying Citric client's export_statistics method to generate the statistics export.@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)