Skip to main content
Glama

insert_softbreak_paragraph

Destructive

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

NameRequiredDescriptionDefault
indexYes
linesYes
doc_idYes
named_style_typeNoNORMAL_TEXT

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say destructiveHint=true; the description adds the non-obvious behavioral detail that named_style_type applies to the entire paragraph the block lands in, not just the inserted span, which alerts the agent to style being written over neighboring text. It also explains how it avoids delete_doc_range's merge-inheritance gotcha. It stops short of stating that inserting shifts downstream indices or what happens if the index lands mid-paragraph, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the what and the when, and the Args block earns its length given zero schema coverage. A few passages are heavier than needed, notably the parenthetical cross-reference to delete_doc_range's docstring and the repeated Returns detail, but nothing is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating insert tool with a nested, undocumented lines structure, the definition covers purpose, alternative, replacement workflow, every parameter, and the return shape (docId, start_index, end_index, per-line line_ranges usable with style_doc_range). Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the lines items are an open object, so the description carries the full burden — and does: it documents text as required/non-empty, enumerates the per-line style keys with types and the 0-1 color channel convention, and enumerates named_style_type's allowed values plus the NORMAL_TEXT default. It also tells the agent where to get index (get_doc_structure).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource — insert a paragraph whose lines are joined by soft line breaks with an explicitly set paragraph style — and immediately contrasts it with insert_doc_text joining lines with "\n", which produces separate paragraphs. An agent can pick between the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit use case (metadata/header blocks that must render as one tight paragraph), an explicit anti-case (insert_doc_text with "\n"), and the replace-existing-content workflow: delete first with delete_doc_range, then call this at the same index. Alternatives and conditions are named rather than inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools