Skip to main content
Glama

word_add_heading

Append a heading paragraph to an existing Word document. Specify the heading level (1-9) and text to insert.

Instructions

Append a heading paragraph at the given level (1..9).

Args: path: Path to an existing .docx. text: Heading text. level: Heading level (1 = Heading 1, ..., 9 = Heading 9). Out-of-range values are rejected with ERR_INVALID_PARAMS. folder: Optional base folder for relative paths.

Returns: {"index": <n>} for the new heading.

Raises: OfficeMCPError: ERR_INVALID_PARAMS for an out-of-range level or a non-int level, ERR_FILE_NOT_FOUND if the file is missing, ERR_UNSUPPORTED_FMT for non- .docx extensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
textYes
levelNo
folderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses that the tool appends (not inserts) a heading, returns an index, and raises specific errors. While it does not detail save behavior or permissions, it provides enough behavioral context for a simple append operation.

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 with clear sections for Args, Returns, and Raises. Every sentence adds value; no redundant or verbose content.

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?

Given the tool has 4 parameters and an output schema, the description covers purpose, parameters, return value, and common errors. It does not mention whether the heading is appended at the end of the document or before other content, but 'append' implies end. Overall, it is sufficiently complete for this tool.

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 0%, but the description explains each parameter: path (existing .docx), text (heading text), level (1..9 with error handling), and folder (optional base). This adds significant meaning beyond the schema titles, compensating for the lack of schema descriptions.

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 appends a heading paragraph at a given level (1..9) to a .docx file. The verb 'append' and resource 'heading paragraph' are specific, and it distinguishes from siblings like word_add_paragraph (which adds normal paragraphs) and word_add_header (which adds headers to sections).

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 specifies valid level range and error conditions (ERR_INVALID_PARAMS, ERR_FILE_NOT_FOUND, ERR_UNSUPPORTED_FMT), which guides proper usage. However, it does not explicitly contrast with similar sibling tools like word_add_paragraph, leaving the agent to infer when to use headings vs normal paragraphs.

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