Skip to main content
Glama

Delete a widget

delete_widget
Destructive

Remove a WordPress widget by ID. Moves it to inactive widgets by default to preserve settings, or permanently delete it with force.

Instructions

Remove a widget. By default it is moved to the inactive widgets area so its settings survive; force: true deletes it outright.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWidget id.
forceNoDelete permanently instead of moving to inactive widgets.
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark the tool as destructive and non-idempotent, but the description goes further by explaining the nuanced behavior: the widget is moved to the inactive area and its settings survive unless force is true. This is meaningful behavioral context beyond what annotations or the schema alone provide.

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?

The description is two sentences with no wasted words. It front-loads the core action and then immediately explains the most important behavioral nuance, making it easy for an agent to parse quickly.

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 simple three-parameter delete tool with no output schema, the description covers the essential behavior and the key force parameter. It could mention what happens to a widget currently placed in a sidebar, but the inactive-widgets explanation provides enough context for correct invocation.

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 description coverage is 100%, so the baseline is 3. The description adds some semantic value by explaining the real-world consequence of force: true versus false, especially that settings survive in the inactive area. It does not compensate for id or site_id, but those are already well documented in the 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 starts with 'Remove a widget,' a specific verb and resource that clearly identifies the tool's action. It also distinguishes itself from sibling delete_* tools by naming 'widget' and from update_widget by the remove semantics. The force behavior adds further clarity without ambiguity.

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 clearly explains the default soft-delete behavior versus the force: true permanent delete, giving agents a decision rule for the force parameter. It does not explicitly discuss when to use this tool instead of update_widget or other alternatives, but the core usage context is clear.

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

Deploy Server

Other Tools