Skip to content

Conversation

@geronica
Copy link
Contributor

@geronica geronica commented Jan 30, 2026

PR Description

This PR adds four new MCP tools for efficient manipulation of CSV files in Spryker projects, specifically designed for managing demo data imports.

New Tools

  1. analyzeCsvFile

Analyzes CSV file structure without loading full content.

Features:

  • Returns headers, row count, and sample rows
  • Optional column analysis (unique values, null counts)
  • Relative paths from project root

Use case: Understand file structure before modifying data

  1. transformCsv

Transform and modify CSV files with three operation modes.

Modes:

  • APPEND: Transfer data from source to target, adding new rows
  • REPLACE: Overwrite target with source data
  • UPDATE: Modify existing rows in-place based on filters (no source needed)

Features:

  • Column mappings (source → target)
  • Row filters with multiple operators (equals, contains, starts_with, greater_than, etc.)
  • Value transformations (string find/replace, math operations)
  • Default values for columns
  • Column removal
  • Automatic backup creation
  • Relative paths from project root

Use case: Update complex CSV files, which are used for data import

  1. deleteCsvRows

Delete rows from CSV based on filter criteria.

Features:

  • Multiple filter criteria (AND logic)
  • Supported operators: equals, not_equals, in, not_in, contains, not_contains, starts_with, ends_with, empty, not_empty
  • Safety check prevents deleting all rows
  • Automatic backup creation
  • Relative paths from project root

Use case: Remove invalid data entries

  1. splitOdsToCsv

Split ODS (OpenDocument Spreadsheet) files into separate CSV files per sheet.

Features:

  • One CSV per sheet
  • Skips empty sheets
  • Returns details about created files
  • Relative paths from project root

Use case: When your data is inside Google sheets you can download it as .ods file and use this tool to export data to Spryker-compatible CSVs

Steps before you submit a PR

  • Please add tests for the code you add if it's possible.
  • Please check out our contribution guide: https://docs.spryker.com/docs/dg/dev/code-contribution-guide.html
  • Add a contribution-license-agreement.txt file with the following content:
    I hereby agree to Spryker's Contribution License Agreement in https://github.com/spryker/incremental-installer/blob/HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH/CONTRIBUTING.md.

This is a mandatory step to make sure you are aware of the license agreement and agree to it. HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH is a hash of the commit you are basing your branch from the master branch. You can take it from commits list of master branch before you submit a PR.

Checklist

  • I agree with the Code Contribution License Agreement in CONTRIBUTING.md

@vitaliiShveider
Copy link
Contributor

vitaliiShveider commented Feb 5, 2026

Please add description, how it should work.
What the process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants