delete_survey
Remove a LimeSurvey survey by specifying its survey ID using the MCP client integration tool for managing surveys and responses.
Instructions
Delete a LimeSurvey survey.
Args:
sid: The survey ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes |
Implementation Reference
- main.py:391-400 (handler)The handler function for the 'delete_survey' tool. It is decorated with @mcp.tool() which registers it, takes a survey ID (sid), uses the LimeSurvey client to delete the survey, and returns a boolean indicating success.@mcp.tool() def delete_survey(sid: int) -> bool: """Delete a LimeSurvey survey. Args: sid: The survey ID. """ with get_client() as client: return client.delete_survey(sid)
- main.py:15-21 (helper)Helper function to create and return a LimeSurvey Client instance using environment variables. Used by the delete_survey handler.def get_client() -> Client: return Client( url=os.getenv("LIMESURVEY_URL"), username=os.getenv("LIMESURVEY_USERNAME"), password=os.getenv("LIMESURVEY_PASSWORD"), )