Skip to main content
Glama

spss_vars_to_cases

Restructure wide datasets into long format by stacking variable groups into new variables. Reshape SPSS .sav files with custom index and ID variables.

Instructions

Restructure wide → long format: VARSTOCASES /MAKE newvar FROM varlist. make_specs: list of {'new_var': name, 'variables': [var1, var2, ...]}; index_name: index variable name; id_name: case ID variable. Requires IBM SPSS Statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_nameNo
file_pathYes
index_nameNo
make_specsYes
output_pathNolong.sav
count_variableNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description bears the full burden of behavioral disclosure. It reveals the underlying SPSS transformation and the requirement for SPSS, but it does not state whether the original file is modified, whether a new file is written, what happens to unspecified variables, or how count_variable/index_name affect output. These are material behavioral gaps for a restructuring operation.

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 compact and front-loaded with the main purpose. Each clause adds useful information: the transformation direction, the SPSS command form, parameter formats, and the SPSS requirement. It is efficient, though a bit telegraphic.

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 6-parameter transformation tool with no annotations and zero schema description coverage, the description is incomplete. It does not explain count_variable or output behavior, and an agent would not know whether the operation overwrites the input or writes to output_path. The presence of an output schema does not cover these gaps.

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 0%, so the description must compensate. It explains make_specs, index_name, and id_name clearly. However, it omits file_path, output_path, and count_variable, all of which have meaning the schema alone does not convey. It partially compensates but not completely.

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 states a specific verb and resource: 'Restructure wide → long format' with the exact SPSS command ('VARSTOCASES /MAKE newvar FROM varlist'). This clearly distinguishes it from sibling tools like spss_cases_to_vars and spss_flip, making the operation unambiguous.

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?

The description clearly indicates the use case (wide-to-long reshaping) and a prerequisite ('Requires IBM SPSS Statistics'). However, it does not explicitly say when not to use it, nor does it name alternative tools or conditions for choosing them. The guidance is implied through the wide-to-long semantics rather than explicit.

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

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/rasitnarcicek/spss-mcp-extended'

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