Skip to main content
Glama

word_set_section

Configure a section's orientation and page size in a Word document. Supports portrait or landscape and named sizes like A4, Letter, Legal.

Instructions

Configure a section's orientation and page size.

Args: path: Path to an existing .docx. orientation: "portrait" or "landscape" (case-insensitive). Any other value raises ERR_INVALID_PARAMS (VAL-WORD-065). page_size: A named page size such as "A4" (default), "Letter", "Legal", "A5", "Tabloid" or "B5" (case-insensitive). section_index: Zero-based section index (default 0). folder: Optional base folder for relative paths.

Returns: {"ok": True}.

Behavior: * Portrait: page_width = <width>, page_height = <height>. * Landscape: page_width = <height>, page_height = <width> (i.e. dimensions are swapped so the wider edge is horizontal).

Raises: OfficeMCPError: ERR_INVALID_PARAMS for an unknown orientation or page_size, ERR_FILE_NOT_FOUND if the file is missing, ERR_UNSUPPORTED_FMT for non-.docx extensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
orientationNoportrait
page_sizeNoA4
section_indexNo
folderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description thoroughly explains behavior: orientation swaps dimensions, page_size options are listed, and specific error codes (ERR_INVALID_PARAMS, ERR_FILE_NOT_FOUND, ERR_UNSUPPORTED_FMT) are provided. Since no annotations exist, the description carries the full burden and does so effectively.

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?

The description is well-structured with sections (Args, Returns, Behavior, Raises) and is appropriately sized. No wasted sentences, though the error handling details could be slightly more concise. Overall efficient.

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?

The description is thorough, covering all parameters, behavior, and errors. However, it does not specify behavior for an out-of-bounds section_index (e.g., if the index doesn't exist). This minor gap prevents a perfect score.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by adding meaning to all 5 parameters: path (existing .docx), orientation (valid values, case-insensitive, error on others), page_size (named sizes), section_index (zero-based, default 0), folder (optional base folder). This fully explains the schema.

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 the tool's purpose: 'Configure a section's orientation and page size.' It uses a specific verb ('Configure') and resource ('section's orientation and page size'), making it immediately distinguishable from sibling tools like word_add_paragraph or word_format_run.

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?

The description lacks explicit guidance on when to use this tool versus alternatives. While the sibling context implies it's for modifying existing document sections, there are no direct comparisons or exclusion criteria. Usage is implied but not explicitly stated.

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/gawirable/office-mcp'

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