delete_doc_range

Delete a content range by index.

destructiveGoogle Sheets, Docs & Drive

Call it

In an AI client (MCP)

tools/call
{
  "name": "delete_doc_range",
  "arguments": {
    "documentId": "<documentId>",
    "startIndex": 1,
    "endIndex": 1
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/delete_doc_range \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"documentId":"<documentId>","startIndex":1,"endIndex":1}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
documentIdrequiredstringthe Google Docs document ID.
startIndexrequiredintegerstart index, inclusive (from find_doc_text or get_doc).
endIndexrequiredintegerend index, exclusive.

Result

Every tool answers {notification, data, human_action}; data carries:

  • { deleted: true }

Gotchas

  • Docs refuses deleting the body's final newline, part of a table, or the newline before a table or section break without the element itself; a range across a paragraph end merges the two paragraphs.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude