import_group
Add a predefined group to a LimeSurvey survey by importing its file content and specifying a survey ID. Simplify survey structure management directly from the LimeSurvey MCP Server.
Instructions
Import a group to a LimeSurvey survey.
Args:
sid: The survey ID.
group_file: The group file content (base64 encoded).
group_name: The name for the imported group.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_file | Yes | ||
| group_name | No | ||
| sid | Yes |
Implementation Reference
- main.py:473-484 (handler)The handler function for the 'import_group' MCP tool. It is decorated with @mcp.tool() for registration and executes the import by calling the underlying LimeSurvey client's import_group method.@mcp.tool() def import_group(sid: int, group_file: str, group_name: str = None) -> int: """Import a group to a LimeSurvey survey. Args: sid: The survey ID. group_file: The group file content (base64 encoded). group_name: The name for the imported group. """ with get_client() as client: return client.import_group(sid, group_file, group_name)