Skip to content

feat: add sheets_insert_rows tool for inserting rows with optional da…#80

Merged
freema merged 1 commit intomainfrom
update-data-overwriting
Sep 22, 2025
Merged

feat: add sheets_insert_rows tool for inserting rows with optional da…#80
freema merged 1 commit intomainfrom
update-data-overwriting

Conversation

@freema
Copy link
Copy Markdown
Owner

@freema freema commented Sep 22, 2025

This pull request introduces a new feature for inserting rows into Google Sheets and improves documentation and validation for related tools. The most significant changes are the addition of the sheets_insert_rows tool, enhancements to the sheets_append_values description, and the corresponding updates to documentation and tests.

New Tool: Row Insertion

  • Added new sheets_insert_rows tool to insert rows at a specific position with optional data, formatting inheritance, and flexible value input options (RAW or USER_ENTERED). Includes implementation in src/tools/insert-rows.ts, registration in src/index.ts, and export in src/tools/index.ts. [1] [2] [3] [4]
  • Added input validation for sheets_insert_rows via validateInsertRowsInput in src/utils/validators.ts, ensuring correct types, defaults, and error handling for all parameters.

Documentation and Usability Improvements

  • Updated README.md to document the new sheets_insert_rows tool, its parameters, and usage examples. Also clarified the default overwrite behavior of sheets_append_values and how to insert new rows. [1] [2]
  • Enhanced the description of sheets_append_values in src/tools/append-values.ts to warn users about the default OVERWRITE behavior and how to use INSERT_ROWS instead.
  • Updated the changelog in CHANGELOG.md to reflect new features and documentation changes for version 1.5.0.
  • Bumped package version to 1.5.0 in package.json.

Testing

  • Added comprehensive unit tests for the new handleInsertRows function in tests/unit/tools/insert-rows.test.ts, covering basic insertion, value population, formatting inheritance, error handling, and edge cases.
  • Added and tested input validation for sheets_insert_rows in tests/unit/utils/validators.test.ts, ensuring robust error reporting and correct defaults. [1] [2]…ta and enhance validation

@freema freema linked an issue Sep 22, 2025 that may be closed by this pull request
@freema freema merged commit 9b236dd into main Sep 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data overwriting instead of inserting new rows when appending values

1 participant