Skip to main content
Glama

add_heading

Insert a new heading (levels 1-9) at a chosen position in a Word document, creating missing heading styles automatically. Supports positioning by index, anchor text, or end; includes backup and validation.

Instructions

Insert a NEW heading paragraph (level 1-9; Heading styles auto-created if missing) positioned by after_index, after_anchor, or at_end. Anchors match plain paragraph text, and heading text recurs in body prose, so prefer after_index for structural work. To restyle an EXISTING paragraph use apply_style; to shift existing heading levels use change_heading_level. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
levelNo
at_endNo
backupNo
file_pathYes
after_indexNo
after_anchorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries the full burden and covers a lot: auto-created styles, backup rotation behavior, atomic validated save, and refusal to operate on documents open in Word. This goes well beyond the raw schema.

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?

Four dense sentences with no filler: purpose, positioning, alternatives, and safety/backup behavior all earn their place. The most decision-relevant information is front-loaded.

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?

For a 7-parameter creation tool with no annotations and a large sibling set, it explains the core operation, the disambiguation guidance, positioning, backup behavior, and a critical refusal condition. The output schema can cover return shape, so nothing essential is missing.

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 does for key parameters with the positioning trio (after_index, after_anchor, at_end), the anchor-matching caveat, level range, and backup=False semantics. It leaves file_path and text to their obvious meanings and does not fully define after_index semantics, so not perfect.

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 opens with 'Insert a NEW heading paragraph', a specific verb and resource, and adds scope (level 1-9; Heading styles auto-created if missing). It also explicitly distinguishes itself from apply_style and change_heading_level, so an agent can tell the operation apart in the large sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says to use apply_style for restyling an existing paragraph and change_heading_level for shifting existing heading levels. It also advises preferring after_index for structural work because anchor matches are ambiguous given recurring heading text.

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/nometalalchemist/KitchenSink4Word'

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