Skip to main content
Glama

Set document page setup

set_page_setup

Set page margins, paper size, and orientation for a Google Doc or tab to control print and layout geometry. Use presets or custom point sizes; changes apply directly.

Instructions

Set document-level page setup for a doc (or tab): page margins, page size, and orientation — the File > Page setup controls. Margins and explicit page sizes are in points (72 pt = 1 inch). pageSize is a preset (letter/legal/a4/tabloid) or an explicit {width,height} in points; orientation (portrait/landscape) swaps the page dimensions. Always a direct change: page geometry is a document-style change, so there is no suggest option.

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": {
      "path": "<path>"
    },
    "name": "set_page_setup"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe doc or tab: a Drive id or URL, /folder/doc, or /folder/doc/tab (nested: /folder/doc/tab/child). A doc with one tab needs no tab step; a doc with several is refused until one is named, and the refusal lists every tab path.
accountNoGoogle account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account.
pageSizeNoa preset name, or {width,height} in points
marginTopNotop margin in points (72 = 1 inch)
marginLeftNoleft margin in points
marginRightNoright margin in points
orientationNoportrait or landscape (orders the page width/height)
marginBottomNobottom margin in points

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.0
    • removedInput schema / properties / documentId
      Removed value: -{
      -  "description": "Google Doc id",
      -  "type": "string"
      -}
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "The doc or tab: a Drive id or URL, /folder/doc, or /folder/doc/tab (nested: /folder/doc/tab/child). A doc with one tab needs no tab step; a doc with several is refused until one is named, and the refusal lists every tab path.",
      +  "type": "string"
      +}
    • removedInput schema / properties / tab
      Removed value: -{
      -  "description": "Target a specific tab by tabId or title (from list_tabs). Defaults to the first tab.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "documentId"
      -]New value: +[
      +  "path"
      +]
  2. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose real behavioral traits: units (72 pt = 1 inch), that orientation reorders width/height, and that the change is always applied directly with no suggest mode. It does not say whether omitted parameters are left untouched or reset, nor what permissions or return value to expect, which are the remaining gaps.

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 tight sentences: purpose first, then units and parameter semantics, then the mutation-mode caveat. No restatement of the tool name and no filler.

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 an 8-parameter mutation tool with no annotations and no output schema, the description covers units, enum/object duality, orientation behavior, and mutation semantics adequately. It is only missing what a successful call returns and whether the update is partial or full — the one area the absent output schema would otherwise cover.

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 earns above baseline by explaining that pageSize accepts a preset name or an explicit {width,height} in points and by clarifying that orientation "swaps the page dimensions" rather than being a no-op. The tab-path disambiguation is left entirely to the schema's path description.

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 and resource ("Set document-level page setup") and enumerates exactly what is changed: margins, page size, orientation. The "File > Page setup controls" mapping plus the doc-or-tab scope makes it immediately distinguishable from the read-side sibling get_page_setup.

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?

Gives clear context for when this applies (document-level page geometry on a doc or tab) and an explicit exclusion: "there is no suggest option," so the agent knows not to route this through the suggestion workflow used by edit_doc/apply_suggestions. It stops short of naming get_page_setup as the read counterpart, but the scope statement implies it.

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