Skip to main content
Glama

apply_plan

Destructive

Validate and apply a batch of edit steps to a DOCX document. All steps must pass validation before any are applied.

Instructions

Validate and apply a batch of edit steps (replace_text, insert_paragraph) to a document in one call. Validates all steps first; applies only if all pass. Accepts inline steps or a plan_file_path. Compatible with merge_plans output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the DOCX file.
stepsNoJSON array of edit steps. Each step needs step_id, operation, and operation-specific fields.
plan_file_pathNoPath to a .json file containing an array of edit steps. Mutually exclusive with steps.
Behavior4/5

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

Annotations already indicate destructive behavior (destructiveHint=true). The description adds crucial behavior: validation first, apply only if all pass, providing atomicity context. No contradictions.

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?

Three sentences, front-loaded with the core action, followed by validation behavior and input options. No superfluous words; every sentence adds unique value.

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 covers the main functionality and validation behavior. However, it omits the return value/result format, which could be important for an agent invoking a destructive operation. Overall complete for core task.

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 descriptions cover 100% of parameters, but the steps schema is vague (empty properties). The description compensates by clarifying that each step requires step_id, operation, and operation-specific fields, adding essential meaning beyond 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 validates and applies a batch of edit steps atomically, with specific examples (replace_text, insert_paragraph). It distinguishes itself from sibling tools like replace_text and insert_paragraph by batching operations, and mentions compatibility with merge_plans.

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

Usage Guidelines4/5

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

The description mentions accepting inline steps or plan_file_path, and compatibility with merge_plans, guiding usage for batch application. However, it does not explicitly exclude single-step scenarios or specify when not to use compared to individual edit tools.

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/UseJunior/safe-docx'

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