Skip to main content
Glama

format_section

Destructive

Partially update a DOCX section’s page-number restart, page size, orientation, or margins by zero-based index from get_sections while preserving layout and section settings.

Instructions

Partially update one DOCX section’s page-number restart, page dimensions/orientation, or margins using a zero-based section_index from get_sections. Effective calls emit one native w:sectPrChange and preserve section topology, page-number format, columns, break type, and header/footer references. Orientation is literal and does not automatically swap dimensions. This tool does not create sections or edit header/footer content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marginsNoPartial margin update in twips. All seven values are required when w:pgMar is absent.
file_pathNoPath to the DOCX or ODT file.
page_sizeNoPartial page-size update. Both dimensions are required when w:pgSz is absent.
google_doc_idNoGoogle Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit
section_indexYesZero-based session-relative index returned by get_sections.
page_number_startNoNon-negative page number at which this section starts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.21.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation profile is known. The description adds substantive behavioral context beyond that: effective calls emit exactly one native w:sectPrChange and preserve section topology, page-number format, columns, break type, and header/footer references, plus the non-obvious caveat that orientation is literal and does not auto-swap dimensions.

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?

Three tightly packed sentences with no filler; the updatable fields and the required index source are front-loaded, and the preservation guarantees and non-goals follow. Every clause carries operational information.

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

Completeness4/5

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

For a 6-parameter mutation tool with nested margin/page_size objects and no output schema, the description covers the mutation semantics, preservation guarantees, and scope limits, which is nearly everything an agent needs. It does not restate return values, appropriately relying on the absence of an output schema.

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. The description adds meaning beyond the schema by clarifying that section_index must be a zero-based index sourced from get_sections and that orientation is literal rather than dimension-swapping, which directly prevents a common invocation error.

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 specific verb (partially update) and a precise resource (one DOCX section's page-number restart, page dimensions/orientation, or margins). It names the sibling that supplies the required index (get_sections) and sets clear scope boundaries against insert_section_break and format_layout by ruling out section creation.

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?

Explicitly directs the agent to obtain section_index from get_sections and states the negative conditions ('does not create sections or edit header/footer content'). It stops short of naming when to prefer format_layout or batch_edit for broader formatting, so it is clear context without full alternative routing.

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