Skip to main content
Glama

delete_element

Delete a Word document element by type: image, chart, hyperlink, bookmark, caption, content control, or reference list. Removes associated media and auto-backs up before saving.

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. Dates show when Glama detected each change.

  1. Addedv2.0.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries full burden and excels: it discloses side effects like removal of media/chart/embedded-workbook parts when unreferenced, backup rotation semantics, hyperlink unwrapping, bookmark text retention, and refusal conditions. This is exactly the behavioral context an agent needs beyond the schema.

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 front-loaded with the core purpose and every sentence carries operational information. A structured list would improve scannability, but the density is justified given the variety of element types and edge cases.

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 multi-type deletion tool with no annotations and 0% schema coverage, this description is remarkably complete: addressing rules, side effects, exclusions, backup behavior, and refusal conditions are all covered. The existing output schema handles return-value details, so nothing essential is missing.

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?

Schema description coverage is 0% and the description compensates by mapping type-specific addressing: list_elements index for equations/images/charts, read order for reference_list, name for bookmarks, target URL in id for hyperlinks, location for captions, and tag/index for content controls. It also explains backup=False and the optional nature of id/location.

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?

States a precise verb and resource: 'Delete one document element that has no lifecycle tool of its own.' It enumerates the accepted element types and explicitly distinguishes itself from sibling delete tools by listing notes/comments/sources/tables/paragraphs as handled elsewhere.

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 explicitly names alternatives and boundaries: elements with lifecycle tools 'stay there' and are routed to manage_note, manage_comment, manage_source, delete_table, and delete_paragraphs. It also communicates refusal conditions such as documents open in Word and locked content controls, so an agent can choose another tool or avoid invalid calls.

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

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/nometalalchemist/KitchenSink4Word'

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