Skip to main content
Glama

add_quota

Add a quota to a LimeSurvey survey to control participant responses based on specific criteria.

Instructions

Add a quota to a LimeSurvey survey.

Args: sid: The survey ID. quota_data: The quota data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidYes
quota_dataYes

Implementation Reference

  • main.py:634-644 (handler)
    The MCP tool handler for 'add_quota'. Decorated with @mcp.tool(), it creates a context-managed Citric Client instance and delegates the quota addition to the LimeSurvey server via client.add_quota(sid, quota_data). This is the core implementation of the tool logic.
    @mcp.tool() def add_quota(sid: int, quota_data: dict[str, Any]) -> int: """Add a quota to a LimeSurvey survey. Args: sid: The survey ID. quota_data: The quota data. """ with get_client() as client: return client.add_quota(sid, quota_data)
  • main.py:15-21 (helper)
    Helper function used by the add_quota handler (and others) to instantiate the Citric Client with credentials from environment variables.
    def get_client() -> Client: return Client( url=os.getenv("LIMESURVEY_URL"), username=os.getenv("LIMESURVEY_USERNAME"), password=os.getenv("LIMESURVEY_PASSWORD"), )
  • main.py:634-634 (registration)
    The @mcp.tool() decorator registers the add_quota function as an MCP tool.
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/edgarrmondragon/limesurvey-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server