Skip to main content
Glama
edgarrmondragon

LimeSurvey MCP Server

export_responses

Export survey responses from LimeSurvey in formats like CSV or JSON, with options for language and heading customization.

Instructions

Export responses from a LimeSurvey survey.

Args:
    sid: The survey ID.
    file_format: The format to export (csv, json, etc).
    language: The language to export (en, es, etc).
    heading_type: The type of heading to export (code, full, abbreviated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidYes
file_formatNocsv
languageNo
heading_typeNocode

Implementation Reference

  • main.py:316-338 (handler)
    The @mcp.tool()-decorated handler function implementing the 'export_responses' tool logic. It uses the citric Client to export survey responses in the specified format and returns the decoded content as a string.
    @mcp.tool()
    def export_responses(
        sid: int,
        file_format: str = "csv",
        language: str | None = None,
        heading_type: str = "code",
    ) -> str:
        """Export responses from a LimeSurvey survey.
    
        Args:
            sid: The survey ID.
            file_format: The format to export (csv, json, etc).
            language: The language to export (en, es, etc).
            heading_type: The type of heading to export (code, full, abbreviated).
        """
        with get_client() as client:
            return client.export_responses(
                sid,
                file_format=file_format,
                language=language,
                heading_type=heading_type,
            ).decode("utf-8")

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/edgarrmondragon/limesurvey-mcp'

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