insert_softbreak_paragraph
Inserts a single paragraph made of multiple soft-broken lines and sets its paragraph style explicitly, so header or metadata blocks render without blank lines between rows.
Instructions
Insert a single paragraph built from multiple lines joined by soft line
breaks (Shift+Enter in the Docs UI), with the paragraph's style set
explicitly rather than inherited from whatever is at index.
Use this for metadata/header-style blocks that must render as one tight paragraph with no blank line between rows — e.g. a document header block: Document ID: KH-OPS-001 (bold) Category: AWS / Database Source: ... insert_doc_text with "\n" between lines creates separate paragraphs with a blank line between them instead. This also sidesteps delete_doc_range's paragraph-merge style-inheritance gotcha (see its docstring) by setting namedStyleType explicitly on the whole paragraph the block lands in, rather than leaving it to whichever neighboring paragraph it happened to merge into.
To replace existing content with a soft-break block: delete it first with delete_doc_range, then call this tool at the same index.
Args: doc_id: The Google Doc file ID. index: Document position to insert at. Use get_doc_structure to find it. lines: List of line dicts, each with: text (str): the line's text (required, non-empty). Optional per-line text style, applied only to that line's own span (same vocabulary as style_doc_range's text-style fields): bold, italic, underline, strikethrough (bool) font_size (float): size in points foreground_color (dict): {"red": 0-1, "green": 0-1, "blue": 0-1} link_url (str | null): set a hyperlink (null to clear) named_style_type: Paragraph style applied to the whole paragraph the inserted block ends up in (per Docs API updateParagraphStyle semantics, this covers the entire paragraph touched by the insert, not just the newly-inserted span). NORMAL_TEXT (default), HEADING_1 … HEADING_6, TITLE, SUBTITLE.
Returns: Confirmation with docId, start_index, end_index (the inserted block's span), and line_ranges — a parallel list of {start_index, end_index} per line, usable directly with style_doc_range for any styling beyond what this call already applied.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"doc_id": "<doc_id>",
"index": "<index>",
"lines": "<lines>"
},
"name": "insert_softbreak_paragraph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| lines | Yes | ||
| doc_id | Yes | ||
| named_style_type | No | NORMAL_TEXT |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||