Skip to main content
Glama

replace_text

Replace specific text in DOCX or Google Docs paragraphs while maintaining original formatting. Use paragraph IDs and string matching to update content precisely.

Instructions

Replace text in a paragraph by bk* id, preserving formatting. Supports DOCX and Google Docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoPath to the DOCX file.
google_doc_idNoGoogle Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit
target_paragraph_idYes
old_stringYes
new_stringYes
instructionYes
normalize_firstNoMerge format-identical adjacent runs before searching. Useful when text is fragmented across runs.

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