Skip to main content
Glama
SPSS-MCP

SPSS-MCP

by Exekiel179

Spss Import Csv

spss_import_csv

Converts CSV files to SPSS .sav format using pandas and pyreadstat, so you can prepare data for SPSS without installing IBM SPSS Statistics. Saves output beside the CSV or to a custom path.

Instructions

Convert a CSV file to SPSS .sav format directly using pandas + pyreadstat — no IBM SPSS Statistics installation required. Much faster than going through SPSS syntax because it bypasses the SPSS engine entirely. Saves the .sav file next to the CSV by default, or to a custom output_path.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "csv_path": "<csv_path>"
    },
    "name": "spss_import_csv"
  }
}

Input Schema

NameRequiredDescriptionDefault
csv_pathYesFull path to the source CSV file.
encodingNoCSV file encoding (default: utf-8).utf-8
delimiterNoColumn delimiter (default: comma).,
output_pathNoDestination .sav file path. Defaults to the same directory as the CSV with .sav extension.
column_labelsNoMapping of column names to SPSS variable labels, e.g. {"age": "Age of respondent"}.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well by disclosing the implementation stack, that no SPSS install is needed, that the SPSS engine is bypassed, and where output is written by default. It stops short of stating what happens to a pre-existing .sav at the destination (overwrite vs. fail) or how encoding/parse errors surface.

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?

Three sentences, front-loaded with the core action and with the output-location behavior placed last. The middle sentence justifying speed is partly marketing and could be trimmed, though it does carry the useful fact that the SPSS engine is bypassed.

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?

Given a simple import tool with fully documented parameters and an output schema, the description covers mechanism, environment requirement, and output destination — enough for an agent to call it correctly. The only real gap, overwrite behavior at the destination, is minor.

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?

Schema description coverage is 100%, so all five parameters are already documented in the schema. The description only restates the output_path default resolution ('next to the CSV by default'), adding no new semantics such as expected format of column_labels keys or delimiter interpretation.

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?

States a specific verb and a concrete format transformation (CSV -> SPSS .sav) and names the mechanism (pandas + pyreadstat), which clearly distinguishes it from data-analysis siblings such as spss_read_data.

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

Usage Guidelines3/5

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

It gives an implicit rationale for choosing this route ('no IBM SPSS Statistics installation required', 'bypasses the SPSS engine'), but never states when to use it versus spss_read_data or the analysis tools, and offers no exclusions or prerequisites (e.g., required column naming or supported data types).

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