import_question
Add a question to a LimeSurvey survey by importing a base64-encoded question file into a specific survey and group. Streamlines survey customization and management.
Instructions
Import a question to a LimeSurvey survey.
Args:
sid: The survey ID.
gid: The group ID.
question_file: The question file content (base64 encoded).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gid | Yes | ||
| question_file | Yes | ||
| sid | Yes |
Implementation Reference
- main.py:509-520 (handler)The main handler function for the 'import_question' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function imports a question into a specified survey group using the LimeSurvey client from the citric library.@mcp.tool() def import_question(sid: int, gid: int, question_file: str) -> int: """Import a question to a LimeSurvey survey. Args: sid: The survey ID. gid: The group ID. question_file: The question file content (base64 encoded). """ with get_client() as client: return client.import_question(sid, gid, question_file)