Skip to main content
Glama

Import survey

limesurvey_import_survey

Import survey files (LSA, CSV, TXT, LSS) into LimeSurvey. Supports file paths for large files and inline base64 for small ones, returning the assigned survey ID.

Instructions

Import an LSA, CSV, TXT, or LSS survey. Use import_data_path for files at or above roughly 50 KB so the server reads and base64-encodes them itself; reserve inline import_data for small files under 200,000 characters of base64 text. The returned sid is the survey ID LimeSurvey actually used: it keeps the ID embedded in the file when that ID is free, destination_survey_id overrides it when set, and on an ID collision LimeSurvey silently assigns a random 6-digit sid instead of failing (verified against the LimeSurvey XMLImportSurvey/insertNewSurvey source).

Calls LimeSurvey RemoteControl method import_survey. Authentication uses the configured service account; do not provide a session key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
import_dataNoBase64-encoded survey file contents; omit when using import_data_path.
new_survey_nameNoOptional replacement survey name.
response_formatNoOutput format. JSON preserves the complete structured result; Markdown is optimized for reading.json
import_data_pathNoLocal file path to a survey file. The server reads and base64-encodes it, so use this instead of inline import_data for files at or above roughly 50 KB. The file must live inside LIMESURVEY_IMPORT_DIR (or LIMESURVEY_EXPORT_DIR as a fallback). Exactly one of import_data or import_data_path must be set.
import_data_typeYesImport file type.
destination_survey_idNoOptional desired ID for the imported survey.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodYes
resultYes
truncatedNo
truncation_messageNo
Behavior5/5

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

Annotations indicate write operation (readOnlyHint=false). Description adds value by revealing underlying LimeSurvey behavior: survey ID assignment logic (keeps embedded ID if free, assigns random 6-digit sid on collision), authentication via service account, and references the underlying RPC method. No contradictions with annotations.

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?

Description is a single paragraph with multiple sentences covering purpose, usage, and behavior. It is informative without fluff, but could be slightly more concise by combining related points. Still well-structured for an AI agent to parse.

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

Completeness5/5

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

For a tool with 6 parameters (1 required) and an output schema, the description covers all key aspects: file type support, size recommendations, ID handling, authentication, and underlying method. No evident gaps for an agent to misuse the tool.

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

Parameters5/5

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

Schema coverage is 100% but description adds critical context: size thresholds for import_data vs import_data_path, the reciprocal exclusivity condition, and sid behavior for destination_survey_id. This significantly enhances the schema's own descriptions.

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

Purpose5/5

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

The description clearly states the tool imports surveys in formats LSA, CSV, TXT, LSS. It distinguishes from sibling tools like import_group and import_question by specifying the resource type. The mention of alternative import_data_path for large files further clarifies scope.

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

Usage Guidelines4/5

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

Provides explicit guidance on when to use import_data_path vs import_data based on file size thresholds (~50 KB, 200,000 characters). Also explains ID collision handling and destination_survey_id usage. Lacks explicit exclusion of when not to use this tool, but the guidelines are sufficient.

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/Wagner-Emden-IT-Services/limesurvey-mcp-server'

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