insert_doc_heading

Convenience: insert a line of text and apply HEADING_{level}.

writeGoogle Sheets, Docs & Drive

Call it

In an AI client (MCP)

tools/call
{
  "name": "insert_doc_heading",
  "arguments": {
    "documentId": "<documentId>",
    "text": "<text>"
  }
}

From code (Tool API)

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

Arguments

NameTypeDescription
documentIdrequiredstringthe Google Docs document ID.
textrequiredstringHeading text. A trailing newline is added automatically.
levelinteger1..6.Default: 1
indexintegera body index at the start of a paragraph (from find_doc_text or get_doc). Omit to append — the heading then joins the last paragraph unless that paragraph is empty.

Result

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

  • { insertedAt: int, endIndex: int }

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude