{"record":{"id":"db85133d0a6f9662","repo":"paperclipai/paperclip","slug":"endindex-must-be-greater-than-startindex","errorCode":null,"errorMessage":"endIndex must be greater than startIndex.","messagePattern":"endIndex must be greater than startIndex\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/google-sheets-mcp-server/src/tools.ts","lineNumber":242,"sourceCode":"      \"clear_values\",\n      \"Clear values in an allowlisted spreadsheet range.\",\n      \"destructive\",\n      readValuesSchema,\n      async ({ spreadsheetId, range }) => {\n        assertAllowed(allowedSpreadsheetIdSet, spreadsheetId);\n        return options.client.clearValues(spreadsheetId, range);\n      },\n    ),\n    makeTool(\n      options,\n      \"delete_rows\",\n      \"Delete rows from an allowlisted spreadsheet tab.\",\n      \"destructive\",\n      deleteRowsSchema,\n      async (input) => {\n        assertAllowed(allowedSpreadsheetIdSet, input.spreadsheetId);\n        if (input.endIndex <= input.startIndex) {\n          throw new Error(\"endIndex must be greater than startIndex.\");\n        }\n        return options.client.deleteRows(input);\n      },\n    ),\n  ];\n}\n","sourceCodeStart":224,"sourceCodeEnd":249,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/packages/google-sheets-mcp-server/src/tools.ts#L224-L249","documentation":"Input validation in the delete_rows tool handler: the caller supplied a row range where endIndex is <= startIndex, which would delete zero or negative rows. The tool checks the parsed deleteRowsSchema input after the allowlist check and rejects the call before it reaches the destructive Sheets API.","triggerScenarios":"Thrown at packages/google-sheets-mcp-server/src/tools.ts:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an endIndex strictly greater than startIndex for the requested range."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}