Skip to main content
Glama

delete_text

Removes specified text from a paragraph, with support for tracked changes (red strikethrough) or immediate deletion, and optional context-based anchoring for accurate matching.

Instructions

Delete text from a paragraph.

Finds the text within the paragraph (across run boundaries if needed). With tracked=True (default) the deleted text stays visible as red strikethrough in Word's Track Changes view — the human reviewer must accept the deletion to remove it permanently. With tracked=False the text is removed immediately.

Provide context_before/context_after to disambiguate when the same text appears multiple times, or when it contains smart quotes / special whitespace.

Args: para_id: paraId of the target paragraph. text: Text to delete (ASCII quotes/dashes/spaces match their Unicode equivalents). author: Author name shown in Word's review pane (tracked=True only). context_before: Text immediately before the target (for precise anchoring). context_after: Text immediately after the target (for precise anchoring). ignore_case: If True, match text and context case-insensitively. tracked: True (default) = red strikethrough the human accepts/rejects. False = text removed immediately, no markup. document_handle: Optional handle for concurrent session isolation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
authorNoClaude
para_idYes
trackedNo
ignore_caseNo
context_afterNo
context_beforeNo
document_handleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description covers key behaviors: tracked deletion leaves red strikethrough, unmatched text fails, ASCII matching of Unicode equivalents, and text found across run boundaries. Missing details on error handling or document_handle impact, but overall transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a brief introduction followed by a bulleted Args list. It is slightly long but every sentence adds value. Could be tightened by removing redundant phrasing like 'Text to delete' but overall efficient.

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?

Given the complexity (8 parameters, 2 required) and numerous sibling tools, the description adequately explains the tool's behavior and parameters. It lacks mention of error cases (e.g., text not found) but is otherwise complete for typical usage.

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?

Since schema description coverage is 0%, the description compensates by explaining each parameter in the Args section, including defaults (author, tracked, ignore_case) and the purpose of context parameters. This adds essential semantics beyond the raw 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 'Delete text from a paragraph' and elaborates on tracked vs. immediate deletion, distinguishing from sibling tools like accept_changes or replace_text. The verb 'delete' plus resource 'text' with specific scope (within a paragraph) provides a precise purpose.

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 explains when to use tracked=True vs tracked=False and provides guidance for disambiguation via context_before/context_after. However, it does not explicitly contrast with similar tools like replace_text or redact_text, leaving some ambiguity about best choice in certain scenarios.

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/Arvindh95Censof/grp-docx-mcp'

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