Skip to main content
Glama

Delete section

swebsy_delete_section
Destructive

Deletes a page component entirely, preventing the stray blank div left by emptying a section. Target the selected component or specify an id/path to remove another component.

Instructions

Remove a component from the current page entirely. Use this instead of emptying a section's contents — an emptied section leaves a stray blank div on the page. Deletes the selected component by default; pass targetId or targetPath (from read_page) to delete a component you did not select.

Input Schema

NameRequiredDescriptionDefault
summaryYes1 sentence naming what is being removed.
targetIdNoThe component to delete by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this OR the path, not both.
targetPathNoZero-based component indexes from the current page root, exactly as returned by the most recent `read_page` call. Omit to delete the selected component.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.13.1
    • addedInput schema / properties / targetId
      Added value: +{
      +  "description": "The component to delete by its id, as `read_page` shows it after `#` (e.g. \"ieyubib\", or \"call-2-2\" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this OR the path, not both.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. First observedv0.8.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered; the description adds real value by explaining the visible consequence of the alternative approach (a stray blank div). It could add more on reversibility/undo, which matters for a destructive operation.

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

Conciseness5/5

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

Three tight sentences: what it does, why not the alternative, and how targeting works. No filler and the key contrast is front-loaded.

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?

For a destructive 3-parameter tool with full schema coverage and annotations, the description covers purpose, alternative, and targeting defaults adequately. The only meaningful omission is whether the deletion is reversible or recoverable via undo.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the parameter descriptions already explain targetId sourcing from read_page and the either/or rule. The description only adds the default of deleting the currently selected component, which the schema's 'Omit to delete the selected component' already conveys, so it stays at the baseline.

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?

A specific verb (remove/delete) plus a specific resource (a component on the current page), with an explicit contrast against the wrong-but-similar action of emptying a section's contents. This differentiates it from edit_section and other siblings without the agent needing to open the schema.

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?

It gives a clear 'use this instead of' rule (don't empty contents, delete the component) and states the default target behavior versus passing targetId/targetPath. It does not name the competing sibling tool (edit_section) explicitly or mention whether the deletion can be undone via swebsy_undo.

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