Skip to main content
Glama

format_layout

Destructive

Apply paragraph spacing, alignment, pagination flags, table row height, and cell padding to DOCX/ODT files or Google Docs, with revision-aware property changes.

Instructions

Apply layout controls (paragraph spacing, paragraph alignment and pagination flags, table row height, cell padding). paragraph_properties sets alignment (w:jc) and sets (true) or removes (false) direct pageBreakBefore/keepNext/keepLines; requests that change nothing are no-ops. Google Docs supports paragraph spacing only. Surface: revisionable — DOCX geometry edits emit native property-change revisions (w:pPrChange/w:trPrChange/w:tcPrChange).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "format_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
strictNo
file_pathNoPath to the DOCX or ODT file.
row_heightNo
cell_paddingNo
google_doc_idNoGoogle Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit
paragraph_spacingNo
paragraph_propertiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / paragraph_properties
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "alignment": {
      +      "enum": [
      +        "left",
      +        "center",
      +        "right",
      +        "both"
      +      ],
      +      "type": "string"
      +    },
      +    "keep_lines": {
      +      "type": "boolean"
      +    },
      +    "keep_next": {
      +      "type": "boolean"
      +    },
      +    "page_break_before": {
      +      "type": "boolean"
      +    },
      +    "paragraph_ids": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.12.1
    • changedInput schema / properties / file_path / description
      Previous value: -"Path to the DOCX file."New value: +"Path to the DOCX or ODT file."
  3. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With destructiveHint=true and readOnlyHint=false already declared, the description adds meaningful context: no-op requests change nothing, Google Docs only honors paragraph spacing, and DOCX geometry edits emit native property-change revisions (w:pPrChange/w:trPrChange/w:tcPrChange). It does not say whether edits are reversible, what permissions are needed, or what the response looks like, so the mutation story remains partially opaque. Nothing here contradicts the annotations.

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 control inventory, then escalating to per-field semantics and backend limitations. Dense but economical; the OOXML element names (w:jc, w:pPrChange) are load-bearing rather than filler, though they add a jargon tax for a general reader.

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 mutation tool with four nested object parameters, no output schema, and sparse schema descriptions, the definition covers the highest-risk unknowns: cross-backend support gaps, no-op behavior, and revision emission. What remains unaddressed is return/error behavior and the addressing parameters (file_path vs google_doc_id vs strict).

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 only 29% across 7 parameters with nested objects, so the description must carry weight. It does add real meaning for paragraph_properties by mapping booleans to set-vs-remove semantics (true adds, false strips pageBreakBefore/keepNext/keepLines) and naming w:jc for alignment, but file_path, google_doc_id, strict, and the twips/dxa units go unexplained.

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?

The description opens with a specific verb-and-resource pairing ('Apply layout controls') and enumerates the exact control families covered: paragraph spacing, alignment/pagination flags, table row height, and cell padding. That enumeration implicitly separates it from siblings like format_numbering, format_section, and clear_formatting, though no sibling is named explicitly.

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 context is implied by the enumerated control list plus one hard constraint ('Google Docs supports paragraph spacing only'), which tells an agent when part of the tool is unusable. There is no explicit statement of when to prefer this over format_section or clear_formatting, and no prerequisites or exclusions are spelled out.

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