Skip to main content
Glama

delete_element

Delete one Word element with no lifecycle tool: equations, images, charts, bookmarks, hyperlinks, captions, reference lists, or content controls. Specify type and identifier; backups automatic.

Instructions

Delete one document element that has no lifecycle tool of its own. type: equation | image | chart | bookmark | hyperlink | caption | reference_list | content_control. Address equations, images, charts by their list_elements index; reference_list (TOC, List of Tables/Figures, index) by its read order; bookmarks by name (markers go, the text stays; Word-internal underscore names refused); hyperlinks by target url in id and/or a location search on the link text (the link is unwrapped, display text kept, the relationship dropped once unshared; several matches without occurrence refuse loudly listing every candidate); captions by location (Caption-styled paragraphs only); content controls by tag or index (the whole control including content; locked controls refused). Deleting an image or chart also removes its media, chart, and embedded-workbook parts once nothing else references them. Objects with lifecycle tools stay there: notes in manage_note (academic pack), comments in manage_comment (review pack), sources in manage_source (references pack), tables in delete_table, paragraphs in delete_paragraphs. 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
idNo
typeYes
backupNo
locationNo
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.8/5.0
Behavior5/5

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

The description is rich in behavioral detail beyond the readOnlyHint=false annotation: it discloses side effects (image/chart media removal, hyperlink unwrapping, bookmark marker removal), refusal conditions (locked controls, Word-open documents, ambiguous hyperlink matches), and persistence behavior (atomic validated save, backup rotation semantics including backup=False). These are exactly the kind of non-obvious effects an agent needs to know.

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 long but densely packed; almost every clause introduces a constraint or behavior that is not available elsewhere. It is front-loaded with the core purpose and type list. A bulleted breakdown of per-type addressing would improve scanability, but there is no redundant or filler content.

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 complex deletion tool with five parameters and no schema descriptions, the description is unusually complete: it covers all supported types, addressing modes, side effects, refusals, backup behavior, and sibling routing. The presence of an output schema means return-value documentation is not required, and nothing critical appears missing.

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 description coverage is 0%, so the description carries the full burden of explaining parameters. It does this well for most: the polymorphic id semantics are detailed per type, type is fully enumerated, location is explained as a search object, and backup behavior is specified. file_path is not explicitly described, but its meaning is conventional and implied by the tool's purpose.

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 opens with a specific verb and resource: 'Delete one document element that has no lifecycle tool of its own,' immediately scoping the tool. It enumerates the supported types (equation, image, chart, bookmark, hyperlink, caption, reference_list, content_control) and explicitly distinguishes it from sibling tools by listing what it does not delete.

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 clear when-to-use guidance: use it for elements without their own lifecycle tool, and lists specific alternatives for the other cases (notes in manage_note, comments in manage_comment, sources in manage_source, tables in delete_table, paragraphs in delete_paragraphs). It also explains how to address each supported type, so an agent can decide correctly before invoking.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.