Skip to main content
Glama

applyParagraphStyle

Apply paragraph-level formatting—alignment, spacing, heading styles, and list depth—to Google Docs paragraphs targeted by character range, text search, or an index within the paragraph.

Instructions

Applies paragraph-level formatting (alignment, spacing, heading styles) to paragraphs identified by a character range or by searching for text. Use namedStyleType to set heading levels (HEADING_1 through HEADING_6). Pass bulletNestingLevel (0-8) to set a paragraph's list depth explicitly — the target must resolve to whole paragraphs; the bullet style is inferred from the existing list, or set it with bulletPreset for paragraphs that are not yet list items.

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": {
      "documentId": "<documentId>",
      "target": "<target>"
    },
    "name": "applyParagraphStyle"
  }
}

Input Schema

NameRequiredDescriptionDefault
styleNoThe paragraph styling to apply. Optional when bulletNestingLevel is provided.
tabIdNoThe ID of the specific tab to apply formatting in. Use listDocumentTabs to get tab IDs. If not specified, operates on the first tab.
targetYesSpecify the target paragraph either by start/end indices, by finding text within it, or by providing an index within it.
documentIdYesThe document ID — the long string between /d/ and /edit in a Google Docs URL.
readHandleNoCapability returned by a previous readDocument call for this document (and tab). Required over HTTP on the 2026-07-28 runtime: it authorizes the write and pins it to the revision that read saw. Omit it on stdio to use that connection's most recent read.
bulletPresetNoBullet glyph preset to use when setting bulletNestingLevel on paragraphs that are not already list items (e.g. "BULLET_DISC_CIRCLE_SQUARE", "NUMBERED_DECIMAL_ALPHA_ROMAN"). Ignored without bulletNestingLevel. When the paragraphs already belong to a list, the existing list's style is reused unless this is set.
bulletNestingLevelNoSets the target paragraph(s) list nesting depth explicitly (0 = top level). The target must resolve to whole paragraphs and, if it spans more than one, they must all belong to the same list (or none). Emits deleteParagraphBullets, leading-tab adjustment, and createParagraphBullets in one batchUpdate. For a paragraph that is not already a list item, any leading tab characters in its text are treated as its current nesting level (they are what createParagraphBullets itself would consume into nesting), so the tab count changed here is relative to that existing count, not zero.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the key constraint that the target must resolve to whole paragraphs (and all paragraphs in a multi-paragraph target must be in the same list), and that bullet style is inferred from the existing list unless bulletPreset is set. It says nothing about the readHandle authorization requirement, the batchUpdate nature/reversibility of the write, or failure modes, which are central for a mutation tool.

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?

Three sentences, front-loaded with the core purpose and then the two non-obvious parameters. The third sentence is long and compounds several clauses, but every sentence carries relevant information and there is no filler.

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

Completeness3/5

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

For a 7-parameter, nested-object mutation tool with no annotations and no output schema, the description covers the conceptual model of targeting and bullet styling but leaves out the authorization requirement (readHandle) and the append-only/irreversible aspects of the write. Adequate but with clear gaps for a tool of this complexity.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3. The description restates much of what the schema already documents (namedStyleType HEADING_1–HEADING_6, bulletNestingLevel range 0–8, bulletPreset for non-list paragraphs) and adds only light synthesis of how bulletNestingLevel and bulletPreset interact; it adds little genuinely new semantic detail for style, target, tabId, or readHandle.

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

Purpose4/5

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

States a specific verb and resource ('Applies paragraph-level formatting ... to paragraphs') and enumerates the kinds of formatting (alignment, spacing, heading styles) plus the two targeting modes. It implicitly separates itself from character-level and slides siblings by scoping to 'paragraph-level', but never names or contrasts a concrete alternative tool.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: it explains how to use namedStyleType and bulletNestingLevel, and that the target 'must resolve to whole paragraphs', but gives no explicit when-to-use/when-not-to-use guidance or named alternative for, say, character-level or slides paragraph styling.

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