Skip to main content
Glama

Set document page setup

set_page_setup

Set page margins, size, and orientation for a Google Doc or tab using presets or point values. Mirrors the File > Page setup dialog with direct changes.

Instructions

Set document-level page setup for a doc (or tab): page margins, page size, and orientation — the File > Page setup controls, which set_style can’t reach. 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. A direct change, not a tracked suggestion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabNoTarget a specific tab by tabId or title (from list_tabs). Defaults to the first tab.
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)
documentIdYesGoogle Doc id
marginLeftNoleft margin in points
marginRightNoright margin in points
orientationNoportrait or landscape (orders the page width/height)
marginBottomNobottom margin in points
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It adds critical context: 'A direct change, not a tracked suggestion', unit conventions ('72 pt = 1 inch'), and that orientation 'swaps the page dimensions'. This goes beyond the schema, though it doesn't mention error handling or permissions.

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?

The description is concise and well-structured: three sentences, each serving a distinct purpose (scope, units/presets, orientation/behavior). No filler or redundant content; every sentence earns its place.

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?

Given no annotations and no output schema, the description is remarkably complete for a 9-parameter tool. It covers the core purpose, scope, unit system, preset options, orientation effect, and mutation semantics, making it self-sufficient for an agent to select and invoke.

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?

The schema already documents all 9 parameters (100% coverage), so the baseline is 3. The description adds meaningful value by explaining pageSize presets and explicit dimensions, margin units in points, orientation semantics, and tab defaulting behavior, enriching the parameter understanding.

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 clearly states a specific action ('Set document-level page setup') and scope ('for a doc (or tab)'), while explicitly distinguishing from the sibling tool set_style ('which set_style can’t reach'). This makes the tool's purpose unambiguous and differentiated.

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 provides a clear context for when to use this tool by referencing 'the File > Page setup controls' and directly contrasting it with set_style. It doesn't explicitly say when NOT to use it, but the exclusion of the alternative is strongly implied.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dasasian/gdocs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server