Skip to main content
Glama
GongRzhe

Office Word MCP Server

insert_header_near_text

Add structured headers to Microsoft Word documents by inserting them before or after specific paragraphs, using text content or paragraph index for precise placement.

Instructions

Insert a header (with specified style) before or after the target paragraph. Specify by text or paragraph index. Args: filename (str), target_text (str, optional), header_title (str), position ('before' or 'after'), header_style (str, default 'Heading 1'), target_paragraph_index (int, optional).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
target_textNo
header_titleNo
positionNoafter
header_styleNoHeading 1
target_paragraph_indexNo
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It describes the action ('Insert a header') and parameters, but does not disclose behavioral traits such as permissions needed, whether the operation is destructive to the document, error handling, or what happens if the target text is not found. This leaves significant gaps for a mutation tool.

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 appropriately sized and front-loaded, starting with the core action and then detailing parameters. Every sentence adds value, though it could be slightly more structured (e.g., separating usage notes from parameter lists).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, mutation operation) and lack of annotations or output schema, the description is moderately complete. It covers parameters well but lacks behavioral context (e.g., effects on the document, error cases). For a tool with no structured safety hints, this is a notable gap.

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 description coverage is 0%, so the description must compensate. It adds meaning by explaining all 6 parameters, including optional ones, default values, and constraints (e.g., position as 'before' or 'after', header_style default 'Heading 1'). This goes beyond the schema, though it could provide more context on parameter interactions.

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 specific action ('Insert a header'), specifies the resource ('before or after the target paragraph'), and distinguishes from siblings by focusing on header insertion with style options, unlike tools like 'add_heading' or 'insert_line_or_paragraph_near_text' which have different purposes.

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 implies usage through parameter explanations (e.g., 'Specify by text or paragraph index'), but does not explicitly state when to use this tool versus alternatives like 'add_heading' or 'insert_line_or_paragraph_near_text'. It provides some context but lacks clear exclusions or named alternatives.

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/GongRzhe/Office-Word-MCP-Server'

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