paperclipai/paperclip · error
endIndex must be greater than startIndex.
Error message
endIndex must be greater than startIndex.
What it means
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.
Solutions
- Pass an endIndex strictly greater than startIndex for the requested range.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/google-sheets-mcp-server/src/tools.ts:242 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/db85133d0a6f9662.
Report an issue: GitHub.
Appendix: source
Thrown at packages/google-sheets-mcp-server/src/tools.ts:242
"clear_values",
"Clear values in an allowlisted spreadsheet range.",
"destructive",
readValuesSchema,
async ({ spreadsheetId, range }) => {
assertAllowed(allowedSpreadsheetIdSet, spreadsheetId);
return options.client.clearValues(spreadsheetId, range);
},
),
makeTool(
options,
"delete_rows",
"Delete rows from an allowlisted spreadsheet tab.",
"destructive",
deleteRowsSchema,
async (input) => {
assertAllowed(allowedSpreadsheetIdSet, input.spreadsheetId);
if (input.endIndex <= input.startIndex) {
throw new Error("endIndex must be greater than startIndex.");
}
return options.client.deleteRows(input);
},
),
];
}
View on GitHub (pinned to a7e689b3c3)