Skip to main content
Glama

Delete object

delete_object
Destructive

Delete objects by ID from a document with reversible snapshot support. Requires approval token for confirmation.

Instructions

Delete objects by id from a document in ONE reversible, snapshot-backed operation.

When to use: dropping one or more existing elements (e.g. stray seed paths) without a Read + set_document_svg full-document rebuild. Get ids from find_objects / inspect_document. To MOVE an object into another group use reparent_object; to rename rather than remove use rename_object.

Key params: object_ids is a non-empty list of ids to remove; an id that is not present is silently skipped (deleting an already-absent object is a successful no-op, not an error). The document root cannot be deleted. Because deletion is HIGH risk, a real removal requires a non-empty approval_token (minted out of band, bound to this one operation); without it the policy gate refuses the op and nothing is written.

Return shape: DeleteResult — all EditResult fields (operation_id, snapshot_id, changed, before/after preview; the edit lands on the working copy only, reversible via restore_snapshot) PLUS affected_ids, the ids that were actually removed. When NONE of the ids existed the call is a genuine no-op: changed=False, empty operation_id/snapshot_id, and affected_ids=[] (no snapshot or Operation Record written).

Example: delete_object(doc_id, ["seed1", "seed2"], approval_token="…")

Render and look before you trust this edit: render with render_preview (or live_render_view) and inspect the result before relying on it; restore_snapshot reverts it if it is wrong.

Risk class: high (delete; approval-gated, reversible via pre-op snapshot — original untouched).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
object_idsYes
approval_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
changedYes
summaryNo
snapshot_idYes
affected_idsYes
operation_idYes
preview_afterNo
preview_beforeNo
Behavior5/5

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

Description adds significant behavioral details beyond annotations: deletion is reversible, silently skips non-existing ids, cannot delete document root, requires approval_token, and return shape details. Annotations already indicate destructiveHint=true, so no contradiction.

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?

Well-structured, front-loads purpose, then usage guidelines, parameter details, return shape, example, and caution. Slightly long but all content is useful; no wasted sentences.

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?

Given output schema exists, description explains return shape (DeleteResult with all EditResult fields plus affected_ids) and edge cases. Also provides risk class and safety steps (render preview, restore_snapshot). Fully adequate.

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 has 0% description coverage, but description provides substantial meaning: object_ids as non-empty list with silent skip behavior, approval_token required for high risk (minted out of band), and doc_id implied. This compensates well for the bare 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?

Clear verb+resource: 'Delete objects by id from a document in ONE reversible, snapshot-backed operation.' Distinguishes from reparent_object and rename_object, providing explicit alternatives.

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?

Explicitly states when to use (dropping elements without full rebuild), when not to use (moving or renaming), and where to get ids (find_objects/inspect_document). Also covers prerequisites like approval_token for high risk operations.

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/jjjsood/inkscape-mcp-server'

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