add_survey
Create and configure new LimeSurvey surveys using structured data inputs. Simplify survey management in MCP client-integrated environments for streamlined deployment and setup.
Instructions
Add a new LimeSurvey survey.
Args:
survey_data: The survey data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| survey_data | Yes |
Implementation Reference
- main.py:368-377 (handler)The handler function for the 'add_survey' MCP tool. It uses a LimeSurvey client to add a new survey with the provided data.@mcp.tool() def add_survey(survey_data: dict[str, Any]) -> int: """Add a new LimeSurvey survey. Args: survey_data: The survey data. """ with get_client() as client: return client.add_survey(**survey_data)
- main.py:15-21 (helper)Helper function that creates and returns a LimeSurvey Client instance using environment variables.def get_client() -> Client: return Client( url=os.getenv("LIMESURVEY_URL"), username=os.getenv("LIMESURVEY_USERNAME"), password=os.getenv("LIMESURVEY_PASSWORD"), )