Skip to main content
Glama

Set paragraph alignment in Google Doc

set_alignment
Idempotent

Aligns every paragraph overlapping a given index range to start, center, end, or justified using a document ID and start/end indexes, without altering text or indexes.

Instructions

Set the horizontal alignment of every paragraph that overlaps the index range [startIndex, endIndex): START (left in left-to-right text), CENTER, END (right in left-to-right text) or JUSTIFIED. Whole paragraphs are aligned even if the range covers only part of one. Get paragraph indexes from get_document’s structure outline or find_text. Does not change text or indexes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endIndexYesEnd of the range (exclusive); must be greater than startIndex.
alignmentYesParagraph alignment.
documentIdYesThe Google Docs document ID (the part between /d/ and /edit in the document URL). A full Google Docs URL is also accepted.
startIndexYesStart of the range (inclusive). Get exact indexes from get_document or find_text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false. The description adds genuinely non-redundant behavior: whole paragraphs are aligned even if the range covers only part of one, and text/indexes are unchanged. This is useful context beyond the structured fields, though auth/permission needs are unaddressed.

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

Conciseness5/5

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

Front-loaded with the core action and range, followed by enum semantics, edge-case behavior, and index sourcing. Every sentence earns its place with no filler.

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 4-parameter mutation tool with no output schema, the definition covers effect, range semantics, enum meanings, whole-paragraph behavior, and index sourcing. Nothing an agent needs to call it correctly is missing.

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

Parameters4/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, but the description adds real meaning: it defines the range as inclusive-exclusive '[startIndex, endIndex)' and glosses the enum values (START = left, END = right in left-to-right text). This supplements the terse schema enum label 'Paragraph alignment.'

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?

The description states a specific verb (set) and resource (horizontal alignment of paragraphs overlapping an index range), immediately distinguishing it from siblings like format_text and set_paragraph_style. An agent can tell exactly what operation is performed without opening the schema.

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

Usage Guidelines4/5

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

It clearly directs the agent on where to obtain inputs ('Get paragraph indexes from get_document's structure outline or find_text'), naming concrete alternative sources. However, it never states when to use this tool versus sibling mutators like set_paragraph_style or format_text, so sibling routing is left implicit.

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