set_question_properties
Modify question properties in LimeSurvey surveys by specifying the question ID and desired properties. Enable precise survey customization and management.
Instructions
Set LimeSurvey question properties.
Args:
qid: The question ID.
properties: The properties to set.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| properties | Yes | ||
| qid | Yes |
Implementation Reference
- main.py:497-507 (handler)The handler function decorated with @mcp.tool(), which registers and implements the 'set_question_properties' tool. It uses the LimeSurvey client to set the properties of a question identified by qid.@mcp.tool() def set_question_properties(qid: int, properties: dict[str, Any]) -> bool: """Set LimeSurvey question properties. Args: qid: The question ID. properties: The properties to set. """ with get_client() as client: return client.set_question_properties(qid, properties)
- main.py:15-20 (helper)Helper function to create and return a LimeSurvey Client instance, used by the tool handler.def get_client() -> Client: return Client( url=os.getenv("LIMESURVEY_URL"), username=os.getenv("LIMESURVEY_USERNAME"), password=os.getenv("LIMESURVEY_PASSWORD"), )
- main.py:497-497 (registration)The @mcp.tool() decorator registers the set_question_properties function as an MCP tool.@mcp.tool()