Skip to main content
Glama

Import survey

limesurvey_import_survey

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.

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

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

NameRequiredDescriptionDefault
methodYes
resultYes
warningsNo
truncatedNo
truncation_messageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "$ref": "#/definitions/__schema0"
      +  },
      +  "type": "array"
      +}
  2. First observedv1.3.1

TDQS

A4.3/5.0
Behavior5/5

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

Even though annotations already cover the safety profile, the description adds substantial non-obvious behavior: the sid retention/override/collision rules (including silent random 6-digit reassignment instead of failure) and the auth model contrasted with limesurvey_get_session_key. This is context an agent could not infer from structured fields.

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?

Front-loaded with purpose and the most decision-relevant guidance; the sid paragraph is dense but earns its length. Slightly verbose for a section that could be tightened, but nothing is filler.

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?

With an output schema present, return values need not be explained, and the description still covers inputs, size tradeoffs, ID behavior, and auth. An agent has everything needed to call it correctly, including the edge case on ID collision.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the path-vs-inline tradeoff with a size heuristic and the precedence of destination_survey_id over the embedded ID, which the terse schema descriptions do not convey.

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?

States a specific verb (Import) and resource (survey) plus the accepted formats (LSA, CSV, TXT, LSS), which is distinctive versus the group/question import siblings. It does not, however, explicitly differentiate from related siblings like limesurvey_add_survey or limesurvey_create_survey_from_spec.

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?

Gives clear conditional guidance on the two data-input paths (path for >=50KB, inline for small files) and states the auth context (service account, no session key). It stops short of saying when to choose import over the alternative add/create-from-spec tools.

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

Deploy Server

Other Tools