Skip to main content
Glama
edgarrmondragon

LimeSurvey MCP Server

import_survey

Import a LimeSurvey survey file to create a new survey in the system. Upload a base64-encoded survey file and optionally name the imported survey.

Instructions

Import a LimeSurvey survey.

Args:
    survey_file: The survey file content (base64 encoded).
    survey_name: The name for the imported survey.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
survey_fileYes
survey_nameNo

Implementation Reference

  • main.py:413-422 (handler)
    The main handler function for the 'import_survey' MCP tool. It is decorated with @mcp.tool() which registers it, takes base64-encoded survey file and optional name, and delegates to the LimeSurvey client's import_survey method.
    @mcp.tool()
    def import_survey(survey_file: str, survey_name: str = None) -> int:
        """Import a LimeSurvey survey.
    
        Args:
            survey_file: The survey file content (base64 encoded).
            survey_name: The name for the imported survey.
        """
        with get_client() as client:
            return client.import_survey(survey_file, survey_name)
  • main.py:15-20 (helper)
    Helper function to create and return a LimeSurvey Client instance using environment variables, used by the import_survey tool.
    def get_client() -> Client:
        return Client(
            url=os.getenv("LIMESURVEY_URL"),
            username=os.getenv("LIMESURVEY_USERNAME"),
            password=os.getenv("LIMESURVEY_PASSWORD"),
        )

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