Skip to main content
Glama

copy_survey

Duplicate a LimeSurvey survey by specifying the source survey ID and assigning a new name for the copied survey. Simplifies survey replication for efficient management.

Instructions

Copy a LimeSurvey survey.

Args: sid: The source survey ID. new_name: The name for the new survey.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_nameYes
sidYes

Implementation Reference

  • main.py:379-389 (handler)
    The main handler function for the 'copy_survey' MCP tool. It takes survey ID and new name, uses a context-managed client from get_client(), and delegates to the citric library's Client.copy_survey method to perform the copy operation and return the new survey ID.
    @mcp.tool() def copy_survey(sid: int, new_name: str) -> int: """Copy a LimeSurvey survey. Args: sid: The source survey ID. new_name: The name for the new survey. """ with get_client() as client: return client.copy_survey(sid, new_name)
  • main.py:15-20 (helper)
    Helper function that creates and returns a citric.Client instance configured with environment variables, used as a context manager by the copy_survey handler and other tools.
    def get_client() -> Client: return Client( url=os.getenv("LIMESURVEY_URL"), username=os.getenv("LIMESURVEY_USERNAME"), password=os.getenv("LIMESURVEY_PASSWORD"), )
  • Input schema defined by type annotations (sid: int, new_name: str) and return type (int), along with docstring describing parameters.
    def copy_survey(sid: int, new_name: str) -> int: """Copy a LimeSurvey survey. Args: sid: The source survey ID. new_name: The name for the new survey. """
  • main.py:379-379 (registration)
    The @mcp.tool() decorator registers the copy_survey 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