Skip to main content
Glama
mdev26

SharePoint MCP Server

by mdev26

Edit_Word_Document

Update Word documents by replacing placeholders or entire sections (bullets, tables) to automate monthly status reports while preserving formatting.

Instructions

Edit an existing Word document (.docx) with find/replace operations and SECTION REPLACEMENT for monthly status reports. Preserves all formatting.

SIMPLE REPLACEMENT: Replace individual placeholders ({{company_name}} -> 'Acme Corp')

SECTION REPLACEMENT FOR MONTHLY REPORTS: Replace entire sections (8 bullets, tables) in one operation.

  • Perfect for monthly status reports where sections need to be updated each month

  • Use section markers: {{section:name}} ... {{/section:name}}

  • Replace all content between markers with fresh bullet points or table rows

  • Preserves formatting and list styles

USE CASES:

  • Monthly status reports: Replace {{section:status_bullets}} with 8 new status items

  • Metrics tables: Replace {{section:metrics}} with updated monthly data

  • Template filling: Replace {{company_name}} and other placeholders with actual values

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the existing Word document in SharePoint
replacementsYesArray of replacement operations. Supports TWO FORMATS: 1. SIMPLE REPLACEMENT (single placeholder): {"find": "{{company_name}}", "replace": "Acme Corp"} 2. SECTION REPLACEMENT (for monthly reports - replaces entire sections like 8 bullets): { "find": "{{section:status_bullets}}", "replace_section": ["Item 1", "Item 2", "Item 3", ...], "section_type": "bullets" } Template must have section markers: {{section:status_bullets}} * Old bullet 1 * Old bullet 2 {{/section:status_bullets}} Section types: "bullets" (for bullet lists) or "table" (for tables)
output_file_pathNoOptional: Path for the modified document. If not provided, overwrites the original file.
Behavior5/5

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

Despite no annotations, the description fully discloses behavioral traits: preserves formatting, supports two replacement modes, overwrites original by default unless output_file_path is provided, and explains section markers. 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?

Well-structured with clear sections for simple and section replacement, use cases, and formatting notes. Every sentence adds value; no superfluous content. Concise yet comprehensive.

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 tool with 3 parameters, a standard schema, and no output schema, the description covers all necessary behavioral and usage aspects. It explains both replacement modes, markers, and output behavior completely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with detailed parameter descriptions. The description adds context and use-case examples but does not introduce new semantic meaning beyond the schema, meeting the baseline expectation.

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?

Clearly states the tool edits existing Word documents with find/replace and section replacement for monthly status reports. Distinguishes from siblings like Create_Word_Document, Delete_Document, etc., by focusing on editing existing .docx files with specific replacement operations.

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?

Provides explicit use cases (monthly status reports, metrics tables, template filling) and explains when to use simple vs. section replacement. Does not explicitly contrast with similar tools like Update_Document, but the context is clear enough for an AI agent to select appropriately.

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/mdev26/mcp-sharepoint-us'

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