Skip to main content
Glama

spss_recode

Recode variable values in SPSS .sav files by defining old-to-new mapping rules, creating new variables to preserve originals, and saving to a specified output path.

Instructions

Recode variable values in a .sav file. rules: list of {'old': value | [lo,hi] | [v1,v2,...] | 'ELSE', 'new': value | 'COPY' | 'SYSMIS'}. into_variables: optional list of new target variables (preserves originals). output_path: optional path to save the transformed file. Requires IBM SPSS Statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesYes
file_pathYes
variablesYes
output_pathNo
into_variablesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It usefully discloses the rule grammar, the 'preserves originals' effect of into_variables, the optional output_path, and the dependency 'Requires IBM SPSS Statistics.' However, it never states whether the original .sav file is modified in place, what happens when output_path is omitted, or how unmatched values are handled beyond an 'ELSE' clause.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences: a front-loaded purpose statement, compact rule grammar, and a one-sentence prerequisite note. Every sentence provides necessary information without repetition or filler.

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

Completeness3/5

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

The description gives enough to attempt a basic recode and the output schema covers return values. However, recoding has subtle semantics that are not addressed: rule evaluation order, whether ranges are inclusive, whether ELSE must be last, and default handling if output_path or into_variables are omitted. For a complex transformation tool, this is a meaningful gap.

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 0%, so the description must compensate, and it does for the non-obvious parameters: rules, into_variables, and output_path. The rule object structure with old/new values, ranges, lists, ELSE, COPY, and SYSMIS is precisely specified. file_path and variables are only named, not defined, but their meaning is reasonably inferable from the tool purpose.

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 lead sentence names a specific verb and resource: 'Recode variable values in a .sav file.' That is clear and unambiguous. It does not differentiate from the closely named sibling spss_autorecode or other transform tools, so it doesn't earn a 5.

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?

The description gives no guidance on when to choose this tool over siblings such as spss_autorecode, spss_compute, or spss_if_transform. It provides rule syntax but no use-case conditions or exclusions, so an agent must infer applicability.

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