Skip to main content
Glama
edgarrmondragon

LimeSurvey MCP Server

export_responses

Export survey responses from LimeSurvey in formats like CSV or JSON, with options for language and heading customization.

Instructions

Export responses from a LimeSurvey survey.

Args:
    sid: The survey ID.
    file_format: The format to export (csv, json, etc).
    language: The language to export (en, es, etc).
    heading_type: The type of heading to export (code, full, abbreviated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidYes
file_formatNocsv
languageNo
heading_typeNocode

Implementation Reference

  • main.py:316-338 (handler)
    The @mcp.tool()-decorated handler function implementing the 'export_responses' tool logic. It uses the citric Client to export survey responses in the specified format and returns the decoded content as a string.
    @mcp.tool()
    def export_responses(
        sid: int,
        file_format: str = "csv",
        language: str | None = None,
        heading_type: str = "code",
    ) -> str:
        """Export responses from a LimeSurvey survey.
    
        Args:
            sid: The survey ID.
            file_format: The format to export (csv, json, etc).
            language: The language to export (en, es, etc).
            heading_type: The type of heading to export (code, full, abbreviated).
        """
        with get_client() as client:
            return client.export_responses(
                sid,
                file_format=file_format,
                language=language,
                heading_type=heading_type,
            ).decode("utf-8")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool exports data but doesn't mention whether this is a read-only operation, whether it requires specific permissions, what the output format looks like (e.g., file download vs. inline data), or any rate limits. For a data export tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by parameter explanations. Every sentence adds value, and there's no redundant information. The parameter list is appropriately formatted for readability. It could be slightly more concise by integrating parameter details into the main sentence, but overall it's well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a 4-parameter export tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'responses' includes, doesn't describe the output (e.g., file content or structure), and doesn't mention error conditions or limitations. For a tool that presumably generates downloadable data, this leaves critical contextual gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists all 4 parameters with brief explanations, adding meaning beyond the schema which has 0% description coverage. It clarifies that 'sid' is a survey ID, 'file_format' includes options like csv/json, 'language' uses codes like en/es, and 'heading_type' has specific values. However, it doesn't provide examples, format details, or constraints for parameters like 'heading_type' values beyond 'code, full, abbreviated'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Export responses') and resource ('from a LimeSurvey survey'), making the purpose immediately understandable. It distinguishes itself from other survey-related tools like 'export_statistics' or 'export_timeline' by focusing specifically on response data. However, it doesn't explicitly differentiate from potential sibling tools that might also export data in different contexts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether the survey must be active), doesn't specify what 'responses' includes (e.g., completed vs. partial responses), and doesn't compare with similar tools like 'export_statistics' or 'download_files'. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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