Skip to main content
Glama

change_heading_level

Promote or demote a Word heading by a specified level, optionally shifting all subordinate headings to preserve the document's structure. Prevents changes that would place headings outside valid levels.

Instructions

Promote (delta=-1) or demote (delta=1) a heading, addressed by exact heading_text or by paragraph_index. subtree=True also shifts every subordinate heading beneath it (until the next same-or-higher heading) by the same delta, keeping the branch's shape. Refuses, changing nothing, if any affected heading would leave levels 1-9 (the blocker is named) or if a heading's level comes from an outlineLvl override or custom style rather than a built-in Heading style (adjust those via set_paragraph_format's outline_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
deltaYes
backupNo
subtreeNo
file_pathYes
heading_textNo
paragraph_indexNo

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 provided, the description carries the full burden and meets it thoroughly. It discloses mutation semantics, subtree behavior, refusal conditions with no partial changes, backup rotation behavior, atomic validated save, and the 'refuses documents open in Word' constraint.

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 dense but every sentence adds necessary operational detail. It is front-loaded with the core action, then moves logically through addressing, subtree behavior, refusal conditions, backup behavior, and Word-lock refusal.

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?

Despite high complexity and no annotations, the description covers operation semantics, edge cases, error/refusal behavior, and backup handling. The presence of an output schema means return values need not be described. Nothing essential is missing.

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?

Schema description coverage is 0%, so the description must compensate, and it does. It explains the meaning of delta (-1/+1), the addressing modes (heading_text or paragraph_index), subtree=True semantics, and backup=False nuance beyond the raw schema types.

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 names a precise operation, 'Promote (delta=-1) or demote (delta=1) a heading,' and specifies how headings are addressed (heading_text or paragraph_index). It also distinguishes itself from alternatives like set_paragraph_format by explicitly calling out heading-level restrictions that belong elsewhere.

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?

The description gives explicit when-to-use scope and an explicit alternative: headings based on outlineLvl overrides or custom styles should instead be adjusted via set_paragraph_format's outline_level. It also clarifies when the tool will refuse to act, which directly guides correct selection.

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