Skip to main content
Glama
edgarrmondragon

LimeSurvey MCP Server

export_statistics

Export survey statistics from LimeSurvey in PDF, Excel, or HTML formats to analyze response data and generate reports.

Instructions

Export statistics for a LimeSurvey survey.

Args:
    sid: The survey ID.
    document_type: The document type (pdf, xls, html).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidYes
document_typeNopdf

Implementation Reference

  • main.py:340-350 (handler)
    The primary handler function for the 'export_statistics' MCP tool. It is decorated with @mcp.tool() which handles registration and schema inference from type hints and docstring. The function exports survey statistics using the LimeSurvey client.
    @mcp.tool()
    def export_statistics(sid: int, document_type: str = "pdf") -> str:
        """Export statistics for a LimeSurvey survey.
    
        Args:
            sid: The survey ID.
            document_type: The document type (pdf, xls, html).
        """
        with get_client() as client:
            return client.export_statistics(sid, file_format=document_type)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'Export statistics' which implies a read operation, but doesn't clarify permissions needed, rate limits, whether it's destructive, or what the output format looks like. This leaves significant gaps for an agent to understand the tool's behavior.

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 appropriately concise with a clear purpose statement followed by parameter explanations. The structure is front-loaded with the main function first. The only minor improvement would be integrating parameter details more seamlessly rather than as a separate 'Args:' section.

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?

For a tool with no annotations, no output schema, and 0% schema description coverage, the description is insufficient. It doesn't explain what 'statistics' includes, what the output looks like, whether there are size limits, authentication requirements, or error conditions. The agent would struggle to use this tool effectively.

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 provides basic parameter explanations ('sid: The survey ID', 'document_type: The document type (pdf, xls, html)'), which adds meaning beyond the schema's 0% description coverage. However, it doesn't explain parameter constraints, format requirements, or provide examples, leaving room for improvement.

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 statistics') and the resource ('for a LimeSurvey survey'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'export_responses' or 'export_timeline', which prevents a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives like 'export_responses' or 'export_timeline'. The description only states what it does, not when it's appropriate or what distinguishes it from similar export functions.

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